/* ==========================================================================
   CommonScents Candles — Shop Page Styles
   ========================================================================== */

/* Nav spread variant for pages with multiple links */
.site-nav--spread {
    justify-content: space-between;
}

.nav-right {
    display: flex;
    gap: 8px;
}

.nav-link--active {
    border-color: rgba(78, 62, 55, 0.12) !important;
    background-color: rgba(250, 245, 236, 0.5) !important;
}

.nav-link--active::after {
    transform: scaleX(1) !important;
}

/* ==========================================================================
   Shop Page Layout
   ========================================================================== */
.shop-page {
    position: relative;
    z-index: 10;
    padding: 120px 24px 100px;
    min-height: 100vh;
}

.shop-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Shop Header */
.shop-header {
    text-align: center;
    margin-bottom: 56px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpText 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.shop-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.85);
    margin-bottom: 14px;
}

.shop-title {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.12em;
    margin-bottom: 18px;
}

.shop-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ==========================================================================
   Filter Bar
   ========================================================================== */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 56px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUpText 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

.filter-btn {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: none;
    border: 1px solid rgba(78, 62, 55, 0.14);
    border-radius: 24px;
    padding: 8px 22px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover {
    border-color: rgba(78, 62, 55, 0.28);
    color: var(--text-primary);
    background-color: rgba(250, 245, 236, 0.6);
}

.filter-btn.active {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    color: #FAF5EC;
}

/* ==========================================================================
   Product Grid
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 80px;
}

/* Product Card */
.product-card {
    background-color: rgba(250, 245, 236, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(78, 62, 55, 0.09);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(100, 80, 60, 0.06);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpText 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.product-card:nth-child(1) { animation-delay: 0.3s; }
.product-card:nth-child(2) { animation-delay: 0.42s; }
.product-card:nth-child(3) { animation-delay: 0.54s; }
.product-card:nth-child(4) { animation-delay: 0.66s; }
.product-card:nth-child(5) { animation-delay: 0.78s; }
.product-card:nth-child(6) { animation-delay: 0.90s; }

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(100, 80, 60, 0.11);
}

.product-card.card-hidden {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
}

/* Product Image Area */
.product-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(145deg, #F5EDE2, #EDE3D5);
    overflow: hidden;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-image-wrap img {
    transform: scale(1.04);
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #F5EDE2, #EDE3D5);
}

.product-placeholder-icon {
    font-size: 3rem;
    opacity: 0.4;
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 12px;
    background-color: var(--text-primary);
    color: #FAF5EC;
}

.product-badge--gold {
    background-color: #B59424;
    color: #FAF5EC;
}

/* Product Info */
.product-info {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.85);
    margin-bottom: 6px;
}

.product-name {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-notes {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    color: rgba(122, 106, 96, 0.7);
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.product-description {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 20px;
}

/* Product Footer: Price + Button */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid rgba(78, 62, 55, 0.07);
}

.product-price {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.04em;
}

.add-to-basket-btn {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: none;
    border: 1px solid rgba(78, 62, 55, 0.2);
    border-radius: 20px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.add-to-basket-btn:hover {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    color: #FAF5EC;
    transform: translateY(-1px);
}

.add-to-basket-btn.added {
    background-color: rgba(180, 148, 36, 0.12);
    border-color: #B59424;
    color: #B59424;
}

/* ==========================================================================
   Shop Note (coming soon strip)
   ========================================================================== */
.shop-note {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 8px;
}

.shop-note .divider-line {
    flex: 1;
    height: 1px;
    background-color: rgba(78, 62, 55, 0.1);
}

.shop-note-inner {
    flex-shrink: 0;
    max-width: 520px;
    text-align: center;
}

.shop-note-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
}

.shop-note-text a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: rgba(78, 62, 55, 0.3);
    transition: text-decoration-color 0.3s ease;
}

.shop-note-text a:hover {
    text-decoration-color: var(--text-primary);
}

/* ==========================================================================
   Basket FAB
   ========================================================================== */
.basket-fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 200;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--text-primary);
    color: #FAF5EC;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(78, 62, 55, 0.3);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
}

.basket-fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 14px 32px rgba(78, 62, 55, 0.35);
}

.basket-fab.pulse {
    animation: fabPulse 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fabPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.basket-fab-count {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #B59424;
    color: #FAF5EC;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Basket Drawer
   ========================================================================== */
.basket-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(78, 62, 55, 0.2);
    backdrop-filter: blur(3px);
    z-index: 290;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.basket-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.basket-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 380px;
    max-width: 92vw;
    background-color: #FAF5EC;
    z-index: 300;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 50px rgba(78, 62, 55, 0.12);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.basket-drawer.open {
    transform: translateX(0);
}

.basket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 28px 20px;
    border-bottom: 1px solid rgba(78, 62, 55, 0.1);
}

.basket-title {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.1em;
}

.basket-close {
    font-size: 1rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.basket-close:hover {
    background-color: rgba(78, 62, 55, 0.08);
    color: var(--text-primary);
}

.basket-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
}

.basket-empty {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    text-align: center;
    padding: 40px 0;
}

.basket-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(78, 62, 55, 0.07);
}

.basket-item-info {
    flex: 1;
}

.basket-item-name {
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.basket-item-price {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.basket-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(78, 62, 55, 0.18);
    background: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: background-color 0.3s ease;
}

.qty-btn:hover {
    background-color: rgba(78, 62, 55, 0.08);
}

.basket-footer {
    padding: 20px 28px 28px;
    border-top: 1px solid rgba(78, 62, 55, 0.1);
}

.basket-subtotal-row,
.basket-delivery-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.basket-free-delivery-msg {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    color: #B59424;
    text-align: center;
    padding: 6px 0 4px;
}

.basket-delivery-nudge {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    text-align: center;
    padding: 4px 0 8px;
}

.basket-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(78, 62, 55, 0.1);
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.06em;
}

.basket-total {
    font-size: 1.1rem;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--text-primary);
    color: #FAF5EC;
    border: none;
    border-radius: 28px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.4s ease, transform 0.3s ease;
    margin-bottom: 14px;
}

.checkout-btn:hover {
    background-color: #3A2E29;
    transform: translateY(-1px);
}

.checkout-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .shop-page {
        padding: 100px 16px 80px;
    }
    .shop-title {
        font-size: 2rem;
    }
    .product-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .basket-fab {
        bottom: 20px;
        right: 20px;
    }
    .shop-note {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .shop-note .divider-line {
        width: 60px;
        height: 1px;
    }
}

/* ==========================================================================
   Variant Dropdown
   ========================================================================== */
.product-variant-select {
    margin-bottom: 16px;
}

.variant-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(122, 106, 96, 0.75);
    margin-bottom: 8px;
}

.variant-dropdown {
    width: 100%;
    padding: 10px 16px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-primary);
    background-color: rgba(250, 245, 236, 0.7);
    border: 1px solid rgba(78, 62, 55, 0.18);
    border-radius: 20px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234E3E37' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 36px;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    letter-spacing: 0.05em;
}

.variant-dropdown:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.5);
    background-color: rgba(250, 245, 236, 0.95);
}

.product-price {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.product-price:not([id]) {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-style: italic;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    letter-spacing: 0;
}

.add-to-basket-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
}

/* ==========================================================================
   Basket Add-on
   ========================================================================== */
.basket-addon {
    margin: 0 28px 4px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(250, 245, 236, 0.5));
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 16px;
}

.basket-addon-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.basket-addon-info {
    flex: 1;
}

.basket-addon-title {
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.basket-addon-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
}

.basket-addon-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.basket-addon-price {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #B59424;
}

.basket-addon-btn {
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: none;
    border: 1px solid rgba(78, 62, 55, 0.22);
    border-radius: 14px;
    padding: 5px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.basket-addon-btn:hover {
    background-color: var(--text-primary);
    color: #FAF5EC;
    border-color: var(--text-primary);
}

.basket-addon-btn.added {
    background-color: rgba(180, 148, 36, 0.12);
    border-color: #B59424;
    color: #B59424;
    cursor: default;
}

/* Remove button for addon in basket items */
.basket-item--addon .qty-btn--remove {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary);
    background: none;
    border: 1px solid rgba(78, 62, 55, 0.15);
    border-radius: 10px;
    padding: 3px 10px;
    cursor: pointer;
    width: auto;
    height: auto;
    transition: all 0.3s ease;
}

.basket-item--addon .qty-btn--remove:hover {
    border-color: rgba(78, 62, 55, 0.35);
    color: var(--text-primary);
}
