﻿/* ─── SHOP PAGE ─── */

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Page header */
.shop-header {
    padding: 40px 32px 28px;
    border-bottom: 0.5px solid #c9a84c22;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #0a0a0a 70%, #0f0d00);
}

.shop-title {
    font-family: "Playfair Display", serif;
    font-size: 42px;
    font-weight: 700;
    color: #f5f0e8;
    line-height: 1.1;
    margin-bottom: 6px;
}

.shop-subtitle {
    font-size: 12px;
    color: #555;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.shop-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Inline search bar */
.shop-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #111;
    border: 0.5px solid #c9a84c22;
    border-radius: 2px;
    padding: 8px 14px;
    transition: border-color 0.2s;
}

.shop-search-bar:focus-within {
    border-color: #c9a84c66;
}

.shop-search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: #f5f0e8;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    width: 180px;
}

.shop-search-bar input::placeholder {
    color: #333;
}

/* Sort select */
.shop-sort select {
    background: #111;
    border: 0.5px solid #c9a84c22;
    border-radius: 2px;
    color: #aaa;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    padding: 8px 32px 8px 12px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s;
}

.shop-sort select:focus {
    border-color: #c9a84c66;
}

/* Filter toggle button */
.shop-filter-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0.5px solid #c9a84c33;
    border-radius: 2px;
    color: #aaa;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 14px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.shop-filter-toggle:hover,
.shop-filter-toggle[aria-expanded="true"] {
    border-color: #c9a84c;
    color: #c9a84c;
}

.filter-active-count {
    background: #c9a84c;
    color: #0a0a0a;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Active filter chips */
.shop-active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 32px;
    border-bottom: 0.5px solid #c9a84c11;
    background: #0a0a0a;
}

.active-filters-label {
    font-size: 11px;
    color: #444;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.active-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #c9a84c11;
    border: 0.5px solid #c9a84c44;
    border-radius: 2px;
    color: #c9a84c;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 4px 10px;
}

.filter-chip-remove {
    background: transparent;
    border: none;
    color: #c9a84c88;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.filter-chip-remove:hover {
    color: #e63946;
}

.clear-all-filters {
    background: transparent;
    border: none;
    color: #444;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    margin-left: auto;
    transition: color 0.2s;
    white-space: nowrap;
}

.clear-all-filters:hover {
    color: #e63946;
}

/* ─── LAYOUT ─── */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    align-items: start;
    min-height: 60vh;
}

/* ─── SIDEBAR ─── */
.shop-filters {
    border-right: 0.5px solid #c9a84c11;
    padding: 28px 24px;
    position: sticky;
    top: 65px;
    max-height: calc(100vh - 65px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
    /* Hidden on mobile until toggle */
    transition: max-height 0.3s ease;
}

.filter-group-title {
    font-size: 11px;
    color: #c9a84c;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 12px;
    font-family: "Inter", sans-serif;
}

.filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: color 0.2s;
}

.filter-check:hover {
    color: #aaa;
}

.filter-check input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border: 0.5px solid #333;
    border-radius: 1px;
    background: #111;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}

.filter-check input[type="checkbox"]:checked {
    background: #c9a84c;
    border-color: #c9a84c;
}

.filter-check input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: 1.5px solid #0a0a0a;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.filter-reset-btn {
    font-size: 11px;
    padding: 8px 16px;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ─── PRODUCT GRID ─── */
.shop-main {
    padding: 28px 28px 40px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.shop-empty {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 20px;
  text-align: center;
}

.shop-empty:not([hidden]) {
  display: flex;
}

.shop-empty p {
    font-size: 14px;
    color: #444;
}

/* Product card overrides for shop grid (taller images) */
.shop-grid .product-img {
    height: 280px;
}

@keyframes shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.skeleton-card {
    border: 0.5px solid #c9a84c11;
    background: #111;
}

.skel {
    background: linear-gradient(90deg, #1a1a1a 25%, #242424 50%, #1a1a1a 75%);
    background-size: 600px 100%;
    animation: shimmer 1.6s infinite linear;
    border-radius: 1px;
}

.skeleton-img {
    height: 280px;
    width: 100%;
}

.skeleton-info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-name {
    height: 14px;
    width: 70%;
}

.skeleton-type {
    height: 11px;
    width: 45%;
}

.skeleton-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.skeleton-price {
    height: 13px;
    width: 35%;
}

.skeleton-btn {
    height: 28px;
    width: 60px;
    border-radius: 2px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-filters {
        position: static;
        max-height: 0;
        overflow: hidden;
        padding: 0 24px;
        border-right: none;
        border-bottom: 0.5px solid #c9a84c11;
        gap: 0;
    }

    .shop-filters.open {
        max-height: 800px;
        padding: 24px;
        gap: 28px;
    }

    .shop-header {
        padding: 28px 20px 20px;
    }

    .shop-title {
        font-size: 32px;
    }
}

@media (max-width: 600px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .shop-main {
        padding: 20px 16px 32px;
    }

    .shop-header-actions {
        width: 100%;
    }

    .shop-search-bar {
        flex: 1;
    }

    .shop-search-bar input {
        width: 100%;
    }

    .shop-active-filters {
        padding: 10px 16px;
    }
}

@media (max-width: 400px) {
    .shop-grid {
        grid-template-columns: 1fr;
    }
}