/*
 * CSS for Remote WC Catalog plugin
 */

/* Search wrapper */
.remote-wc-search { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    margin-bottom: 20px; 
}
.remote-wc-search-input {
    width: 400px; 
    max-width: 90%; 
    padding: 12px 16px; 
    font-size: 18px; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Spinner */
.remote-wc-spinner { 
    display: none; 
    margin-bottom: 10px; 
}
.remote-wc-spinner div { 
    width: 18px; 
    height: 18px; 
    margin: 3px; 
    background-color: #0073aa; 
    border-radius: 50%; 
    display: inline-block;
    animation: bouncedelay 1.4s infinite ease-in-out both; 
}
.remote-wc-spinner .bounce1 { 
    animation-delay: -0.32s; 
} 
.remote-wc-spinner .bounce2 { 
    animation-delay: -0.16s; 
}
@keyframes bouncedelay { 
    0%, 80%, 100% {
        transform: scale(0);
    } 
    40% {
        transform: scale(1);
    } 
}

/* Product grids */
.remote-wc-grid, 
.remote-wc-search-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}
.remote-wc-item {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}
.remote-wc-item img {
    max-width: 100%;
    height: auto;
}
.remote-wc-item-title {
    font-size: 16px;
    margin: 10px 0;
}
.remote-wc-item-price {
    font-weight: bold;
}
.remote-wc-item-link {
    display: inline-block;
    padding: 6px 12px;
    background: #0073aa;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

/* Pagination */
.remote-wc-pagination {
    margin-top: 20px;
    text-align: center;
}
.remote-wc-pagination a {
    margin: 0 4px;
    text-decoration: none;
}
.remote-wc-pagination a.current {
    font-weight: bold;
}

/* Force 2 columns on mobile */
@media (max-width: 768px) {
    .remote-wc-grid, 
    .remote-wc-search-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Force-hide class to override any theme rules */
.hidden-by-search { 
    display: none !important; 
    opacity: 0 !important; 
}

.remote-wc-grid a:focus {
    outline: none;
}