/* ============================================
   NIERYY — Shop Page Styles
   ============================================ */

/* Force navbar to be in scrolled state on shop page */
.shop-nav {
    background: rgba(253, 252, 250, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px 0 !important;
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.04);
}

.shop-nav .logo-img {
    height: 40px;
}

/* === SHOP HEADER === */
.shop-header {
    padding: 160px 0 60px;
    background: var(--bg-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.shop-header::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(214, 51, 98, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Image-backed variant */
.shop-header--image {
    padding: 200px 0 100px;
}

.shop-header--image::before {
    display: none;
}

.shop-header--image .shop-header-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 25%;
    z-index: 0;
}

.shop-header--image .shop-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.55) 100%);
    z-index: 1;
}

.shop-header--image .container {
    position: relative;
    z-index: 2;
}

.shop-header--image .breadcrumbs,
.shop-header--image .breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
}

.shop-header--image .breadcrumbs a:hover {
    color: #fff;
}

.shop-header--image .breadcrumb-sep {
    color: var(--gold);
    opacity: 0.8;
}

.shop-header--image .shop-title {
    color: #fff;
}

.shop-header--image .shop-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.shop-header--image #breadcrumbCategory {
    color: var(--gold);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.breadcrumbs a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--rose);
}

.breadcrumb-sep {
    color: var(--gold);
    opacity: 0.5;
}

#breadcrumbCategory {
    color: var(--rose);
    font-weight: 600;
}

.shop-title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.shop-subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    font-style: normal;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* === SHOP BODY === */
.shop-body {
    padding: 80px 0 100px;
    background: var(--bg-primary);
}

.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 60px;
    align-items: flex-start;
}

/* === SIDEBAR === */
.shop-sidebar {
    position: sticky;
    top: 100px;
}

.filter-block {
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.filter-block:last-child {
    border-bottom: none;
}

.filter-heading {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 0.06em;
}

.filter-list {
    list-style: none;
    padding: 0;
}

.filter-list li {
    margin-bottom: 12px;
}

.filter-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0 14px !important;
}

.filter-link {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-out);
    position: relative;
    padding-left: 0;
}

.filter-link::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 1px;
    background: var(--rose);
    opacity: 0;
    transition: all 0.3s var(--ease-out);
}

.filter-link:hover,
.filter-link.active {
    color: var(--rose);
    padding-left: 16px;
}

.filter-link:hover::before,
.filter-link.active::before {
    opacity: 1;
    left: 0;
}

.filter-link.active {
    font-weight: 600;
}

/* Price Options */
.price-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.price-option {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}

.price-option:hover {
    color: var(--rose);
}

.price-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1px solid var(--border);
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.price-option input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--rose);
    border-color: var(--rose);
}

.price-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Size Pills */
.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.size-pill {
    padding: 10px 0;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    transition: all 0.3s var(--ease-out);
}

.size-pill:hover,
.size-pill.active {
    background: var(--rose);
    color: white;
    border-color: var(--rose);
}

/* Color Swatches */
.color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.color-swatch.active {
    transform: scale(1.15);
}

.color-swatch.active::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid var(--rose);
    border-radius: 50%;
}

/* === MAIN CONTENT === */
.shop-main {
    min-width: 0;
}

/* Toolbar */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.result-count {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: transparent;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    border-color: var(--rose);
    color: var(--rose);
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.sort-label {
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: none;
}

.sort-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 6px 28px 6px 4px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.sort-select:hover,
.sort-select:focus {
    border-color: var(--rose);
}

.sort-arrow {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Active Filters */
.active-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-left: 3px solid var(--rose);
}

.active-label {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

.active-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: white;
    color: var(--rose);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--rose);
}

.clear-all {
    margin-left: auto;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.clear-all:hover {
    color: var(--rose);
}

/* === PRODUCTS GRID === */
.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px 24px;
}

.shop-product-card {
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: cardFadeIn 0.6s var(--ease-out) forwards;
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shop-product-card:nth-child(1) { animation-delay: 0.05s; }
.shop-product-card:nth-child(2) { animation-delay: 0.1s; }
.shop-product-card:nth-child(3) { animation-delay: 0.15s; }
.shop-product-card:nth-child(4) { animation-delay: 0.2s; }
.shop-product-card:nth-child(5) { animation-delay: 0.25s; }
.shop-product-card:nth-child(6) { animation-delay: 0.3s; }
.shop-product-card:nth-child(7) { animation-delay: 0.35s; }
.shop-product-card:nth-child(8) { animation-delay: 0.4s; }
.shop-product-card:nth-child(9) { animation-delay: 0.45s; }

.shop-product-card .product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: var(--bg-secondary);
    margin-bottom: 18px;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* The clickable image link fills the wrapper so the whole frame is hit-able.
   (Nested <a> is illegal, so quick-actions are buttons positioned on top.) */
.shop-product-card .product-image-link {
    position: absolute;
    inset: 0;
    display: block;
    z-index: 1;
}

.shop-product-card .product-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.6s ease, transform 1s var(--ease-out);
}

.shop-product-card .product-img-2 {
    opacity: 0;
}

.shop-product-card:hover .product-img-1 {
    opacity: 0;
}

.shop-product-card:hover .product-img-2 {
    opacity: 1;
}

.shop-product-card:hover .product-image {
    transform: scale(1.05);
}

.shop-product-card .product-badge {
    display: none;
}

.shop-product-card .product-badge.bestseller {
    background: var(--gold);
}

.shop-product-card .product-badge.sold-out {
    background: var(--brown);
}

.shop-product-card .quick-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.4s var(--ease-out);
}

.shop-product-card:hover .quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.shop-product-card .quick-action-btn {
    width: 38px;
    height: 38px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    /* Reset <button> defaults */
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
}

.shop-product-card .quick-action-btn:hover {
    background: var(--rose);
    color: white;
}

.shop-product-card .quick-add {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: white;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    z-index: 2;
    opacity: 0;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out), background-color 0.3s ease;
    pointer-events: none;
    will-change: transform, opacity;
}

.shop-product-card:hover .quick-add {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

.shop-product-card .quick-add:hover {
    background-color: rgba(214, 51, 98, 0.85);
}

.shop-product-card .product-info {
    text-align: left;
    padding: 0 4px;
}

.shop-product-card .product-category-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
}

.shop-product-card .product-name {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 17px;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.3;
}

.shop-product-card .product-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-product-card .product-price {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--rose);
}

.shop-product-card .product-price-old {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.shop-product-card .color-dots {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.shop-product-card .color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

/* === EMPTY STATE === */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 15px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 24px;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid var(--border);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--rose);
    color: var(--rose);
}

.page-btn.active {
    background: var(--rose);
    border-color: var(--rose);
    color: white;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 6px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 220px 1fr;
        gap: 40px;
    }

    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .shop-header {
        padding: 130px 0 40px;
    }

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

    .shop-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 340px;
        height: 100vh;
        background: var(--bg-primary);
        padding: 100px 30px 40px;
        overflow-y: auto;
        z-index: 998;
        transition: left 0.5s var(--ease-out);
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1);
    }

    .shop-sidebar.active {
        left: 0;
    }

    .filter-toggle {
        display: flex;
    }

    .shop-toolbar {
        flex-wrap: wrap;
        gap: 16px;
    }

    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 14px;
    }

    /* Mobile grid honours the view toggle (default 2-col, optional 1-col) */
    .shop-products-grid.cols-1 {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .shop-products-grid.cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .shop-product-card .product-name {
        font-size: 15px;
    }

    /* Show view toggle only on mobile */
    .view-toggle {
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .shop-title {
        font-size: 36px;
    }
}

/* === VIEW TOGGLE (mobile column selector) === */
.view-toggle {
    display: none; /* desktop hides it — toggle is mobile-only */
    align-items: center;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
    background: var(--bg-primary);
}

.view-btn {
    background: transparent;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.is-active {
    background: var(--text-primary);
    color: #fff;
}
