.site-main {
    width: 100%;
}

section {
    margin-bottom: 1.75rem;
}

h1, h2, h3, h4 {
    color: #0f172a;
}

button,
input[type="search"],
input[type="text"] {
    font: inherit;
}

/* Loading & Error States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    margin: 1rem auto;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #1d4ed8;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    padding: 1rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-state h3 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    color: #0f172a;
}

.empty-state p {
    margin: 0 0 0.5rem;
    color: #475569;
    font-size: 0.95rem;
}

.empty-state p:last-child {
    margin-bottom: 0;
}

/* Cards */
.card {
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.product-card .product-flags {
    margin-bottom: 0.55rem;
}

.product-featured-badge {
    display: inline-block;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.product-featured-badge.is-featured {
    background: #fef3c7;
    color: #92400e;
}

.product-featured-badge.is-standard {
    background: #e2e8f0;
    color: #334155;
}

.product-card .product-price {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.product-card .product-price del {
    color: #64748b;
}

.product-card .product-price ins {
    color: #0f766e;
    text-decoration: none;
    font-weight: 700;
}

.product-taxonomy {
    margin: 0.3rem 0;
    font-size: 0.86rem;
    color: #334155;
}

.product-term {
    display: inline-block;
    margin: 0.2rem 0.2rem 0 0;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: #f1f5f9;
}

/* Buttons */
button.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.2rem;
    border: none;
    border-radius: 999px;
    background: #1d4ed8;
    color: #ffffff;
    cursor: pointer;
    transition: background 160ms ease;
}

button.primary-button:hover {
    background: #2563eb;
}

button.primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Search */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.search-form button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: #1d4ed8;
    color: #ffffff;
    cursor: pointer;
    transition: background 160ms ease;
}

.search-form button:hover {
    background: #2563eb;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination button {
    padding: 0.6rem 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    transition: all 160ms ease;
    text-decoration: none;
}

.pagination a:hover,
.pagination button:hover {
    background: #f3f4f6;
    border-color: #1d4ed8;
}

.pagination .active {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
}

.pagination .disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.shop-results {
    min-width: 0;
}

.filters-toggle {
    display: none;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    cursor: pointer;
}

.filters-panel {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.9rem;
}

.filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.filters-head h3 {
    margin: 0;
    font-size: 1rem;
}

.filters-close {
    display: none;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
}

.filters-group {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 0;
    padding: 0.75rem 0 0;
}

.filters-group legend {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
    padding: 0;
}

.filters-group label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.45rem 0;
    color: #334155;
    font-size: 0.92rem;
}

.filters-group input[type="checkbox"] {
    accent-color: #1d4ed8;
}

.price-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.price-label input {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.filters-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.filters-actions button:not(.primary-button) {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    background: #ffffff;
    cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .site-main {
        padding: 1rem;
    }

    .hero {
        padding: 1.5rem;
    }

    .grid-list.cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-links a {
        width: 100%;
        justify-content: center;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form input,
    .search-form button {
        width: 100%;
    }

    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .site-navigation {
        width: 100%;
    }

    .filters-toggle {
        display: inline-flex;
        align-items: center;
    }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .filters-panel {
        position: fixed;
        inset: auto 0 0 0;
        top: auto;
        max-height: 80vh;
        z-index: 30;
        border-radius: 16px 16px 0 0;
        transform: translateY(110%);
        transition: transform 180ms ease;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.22);
    }

    .filters-panel.is-open {
        transform: translateY(0);
    }

    .filters-close {
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .site-main {
        padding: 0.75rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .grid-list.cards {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 0.75rem;
    }

    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-nav-links {
        justify-content: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }
}
