﻿.shop-page {
    background: linear-gradient(180deg, #fff 0%, #fdf6ff 100%);
    padding: 42px 0 70px;
}

.shop-head {
    text-align: center;
    margin-bottom: 30px;
}

.shop-head h1 {
    font-size: 38px;
    color: var(--purple-dark);
    margin-bottom: 6px;
}

.shop-head p {
    color: var(--text-gray);
    font-size: 16px;
}

.shop-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 26px;
    align-items: start;
}

.shop-filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid #d8c8ec;
    border-radius: 999px;
    background: #fff;
    color: var(--purple-dark);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(106, 13, 173, 0.08);
}

.shop-filter-toggle:hover {
    background: #faf5ff;
}

.shop-filters,
.shop-products-wrap {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.shop-filters {
    padding: 22px;
    position: sticky;
    top: 95px;
    margin-top: 14px;
}

.shop-filters h3 {
    font-size: 20px;
    color: var(--purple-dark);
    margin-bottom: 14px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.filter-option {
    display: block;
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.price-range-input {
    width: 100%;
}

.price-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

/* TAG chips */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    border: 1px solid #ead8ff;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    color: #68458b;
    background: #fcf8ff;
}

.tag-chip {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.tag-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tag-chip span {
    border: 1px solid #ead8ff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #68458b;
    background: #fcf8ff;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.tag-chip:hover span {
    border-color: #c9a7f2;
    transform: translateY(-1px);
}

.tag-chip input:checked + span {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.12));
    border-color: #9b63f6;
    color: #5b2ba0;
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.14);
}

/* --- COLOR FILTERS (now matching plush colours) --- */

.color-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.color-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.color-swatch input {
    display: none;
}

.color-dot {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

/* Individual colours (picked from actual plush palette) */
.color-orange { background: #ff9736; } /* Flame Dragon */
.color-yellow { background: #ffeaa7; } /* Electric Mouse */
.color-lilac  { background: #c7a6ff; } /* Lilac Turtle */
.color-cream  { background: #f5e1b8; } /* Daisy Bunny */
.color-beige  { background: #e1c1aa; } /* Meadow Bunny */
.color-pink   { background: #ff8ac2; } /* Berry Bunny */

.color-swatch input:checked + .color-dot {
    transform: scale(1.12);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.5);
}

/* Clear filters button */
.filter-clear-wrap {
    margin-top: 26px;
}

.apply-filters-btn {
    width: 100%;
    padding: 11px 0;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, var(--purple-dark), #9932cc);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.apply-filters-btn:hover {
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.24);
    transform: translateY(-1px);
    opacity: 0.95;
}

.clear-filters-btn {
    width: 100%;
    padding: 11px 0;
    border-radius: 999px;
    border: 1.5px solid #c7a8e6;
    background: #fff;
    color: #7c3aed;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.clear-filters-btn:hover {
    background: linear-gradient(90deg, #f5e7ff, #ffe6f4);
    box-shadow: 0 6px 14px rgba(124, 58, 237, 0.15);
    transform: translateY(-1px);
}

/* PRODUCTS WRAP */

.shop-products-wrap {
    padding: 20px;
}

.shop-search {
    padding: 10px 10px 18px;
    margin-bottom: 24px;
    border-bottom: 1px solid #efe6f8;
    background: linear-gradient(180deg, #fff 0%, #fcf8ff 100%);
    border-radius: 14px;
}

.shop-search-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.shop-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid #d8c8ec;
    border-radius: 14px;
    background: #fff;
    padding: 14px 16px;
    width: 100%;
    min-height: 64px;
    box-shadow: 0 6px 16px rgba(106, 13, 173, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.shop-search-input-wrap:hover {
    border-color: #c7a8e6;
}

.shop-search-input-wrap:focus-within {
    border-color: var(--purple-dark);
    box-shadow: 0 0 0 4px rgba(106, 13, 173, 0.12), 0 8px 18px rgba(106, 13, 173, 0.14);
    transform: translateY(-1px);
}

.shop-search-input-wrap i {
    color: var(--purple-dark);
    font-size: 18px;
}

.shop-search-input-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-dark);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 500;
}

.shop-search-input-wrap input::placeholder {
    color: #9b8db3;
    font-weight: 400;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.shop-product-card {
    border: 1px solid #f1e7fa;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.shop-product-card.is-clickable {
    cursor: pointer;
}

.shop-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.shop-product-card.is-clickable:focus-visible {
    outline: none;
    transform: translateY(-4px);
    box-shadow: 0 0 0 3px rgba(160, 102, 240, 0.3), 0 10px 24px rgba(0, 0, 0, 0.10);
}

.shop-product-image {
    height: 280px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    background-color: #fcf8ff;
}

.shop-selling-fast-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f97316 0%, #ef4444 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
}

.shop-product-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Local plush images */
.image-1 {
    background-image: url('../images/products/flame-dragon-plush.jpg');
}

.image-2 {
    background-image: url('../images/products/electric-mouse-plush.jpg');
}

.image-3 {
    background-image: url('../images/products/lilac-sea-turtle-plush.jpg');
}

.image-4 {
    background-image: url('../images/products/bunny-pink-hat-plush.jpg');
}

.image-5 {
    background-image: url('../images/products/bunny-meadow-plush.jpg');
}

.image-6 {
    background-image: url('../images/products/bunny-berry-plush.jpg');
}

.shop-fav {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: var(--pink);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.shop-fav:hover {
    transform: scale(1.06);
}

.shop-fav.is-active {
    background: var(--pink);
    color: #fff;
}

.shop-product-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-product-name {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.shop-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.shop-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--purple-dark);
}

.shop-stock {
    font-size: 12px;
    border-radius: 999px;
    padding: 3px 8px;
    background: #dff7df;
    color: #2c7a2c;
}

.shop-stock.out {
    background: #ffe2e2;
    color: #9b2b2b;
}

.shop-rating {
    font-size: 13px;
    color: #e2ad00;
}

.shop-review-count {
    color: #777;
}

/* Add to Cart button */
.shop-atc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: auto;
    padding-top: 10px;
    padding: 9px 0;
    background: linear-gradient(90deg, var(--purple-dark), #9932CC);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.shop-atc-btn:hover { opacity: 0.88; }
.shop-atc-btn.atc-added {
    background: linear-gradient(90deg, #16a34a, #15803d);
}

/* Toast notification */
.cart-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--purple-dark);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 24px rgba(106,13,173,0.25);
    z-index: 9999;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}
.cart-toast.show { opacity: 1; transform: translateY(0); }
.cart-toast.cart-toast-error { background: #c0392b; }

/* Variations modal */
.var-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}
.var-modal {
    background: #fff;
    border-radius: 18px;
    padding: 26px 22px;
    width: 340px;
    max-width: 95vw;
    box-shadow: 0 12px 40px rgba(106,13,173,0.18);
}
.var-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--purple-dark);
    margin-bottom: 16px;
}
.var-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}
.var-options-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.var-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    border: 1.5px solid #e0d0f5;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.var-option:hover { border-color: var(--purple-dark); background: #f9f0ff; }
.var-option-selected { border-color: var(--purple-dark); background: #f3e8ff; }
.var-option-disabled { opacity: 0.45; cursor: not-allowed; }
.var-option-label { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.var-option-stock { font-size: 12px; color: #888; }
.var-modal-add-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    background: linear-gradient(90deg, var(--purple-dark), #9932CC);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.var-modal-add-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.var-modal-add-btn:not(:disabled):hover { opacity: 0.88; }

/* RESPONSIVE */

@media (max-width: 1024px) {
    .shop-filter-toggle {
        display: inline-flex;
    }

    .shop-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .shop-filters {
        display: none;
        position: static;
        margin-top: 0;
    }

    .shop-filters.is-open {
        display: block;
    }

    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .shop-page {
        padding: 26px 0 48px;
    }

    .shop-head {
        margin-bottom: 20px;
    }

    .shop-grid {
        grid-template-columns: 1fr;
    }

    .shop-head h1 {
        font-size: 30px;
    }

    .shop-head p {
        font-size: 15px;
    }

    .shop-filter-toggle {
        font-size: 14px;
        padding: 11px 14px;
    }

    .shop-products-wrap {
        padding: 14px;
        border-radius: 14px;
    }

    .shop-search {
        padding: 0 0 18px;
        margin-bottom: 18px;
    }

    .shop-search-input-wrap {
        min-height: 54px;
        padding: 12px 14px;
    }

    .shop-search-input-wrap input {
        font-size: 16px;
    }

    .shop-product-image {
        height: 240px;
    }
}
