@import url("root.css");

body{
    background-color: var(--10) !important;
    color: var(--8);
    font-family: var(--garet);
    margin: 0;
    padding: 0;
}

/* Page layout */
.shop-page{
    max-width: 1280px;
}

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

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

.profile-sidebar{
    position: sticky;
    top: 24px;
}

.profile-sidebar-card{
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255, 235, 56, 0.35), transparent 34%),
        linear-gradient(180deg, rgba(248, 197, 246, 0.28) 0%, rgba(191, 239, 228, 0.42) 100%);
    border: 1px solid rgba(202, 142, 182, 0.28);
    box-shadow: 0 18px 36px rgba(6,10,14,0.10);
}

.profile-sidebar-kicker,
.profile-preview-kicker{
    margin: 0 0 8px;
    font-family: var(--poppins);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--9);
}

.profile-sidebar-title,
.profile-preview-title{
    margin: 0;
    font-family: var(--garet);
    font-weight: 700;
    color: var(--8);
}

.profile-sidebar-title{
    font-size: 34px;
    line-height: 1;
}

.profile-sidebar-copy,
.profile-preview-copy{
    margin: 12px 0 0;
    color: var(--9);
    line-height: 1.55;
}

.profile-options{
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.profile-option{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 14px 16px;
    text-align: left;
    border: 1px solid rgba(24, 39, 54, 0.08);
    border-radius: 20px;
    background: rgba(255,255,255,0.72);
    color: var(--8);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.profile-option:hover{
    transform: translateY(-1px);
    border-color: rgba(255, 17, 103, 0.35);
    box-shadow: 0 10px 18px rgba(6,10,14,0.08);
}

.profile-option.active{
    background: var(--hard-white);
    border-color: rgba(255, 17, 103, 0.42);
    box-shadow: 0 14px 28px rgba(255, 17, 103, 0.10);
}

.profile-option-label{
    font-size: 18px;
    font-weight: 700;
}

.profile-option-meta{
    font-size: 13px;
    color: var(--silver);
    line-height: 1.45;
}

.profile-preview{
    margin-top: 22px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(24, 39, 54, 0.08);
}

.profile-preview-header{
    margin-bottom: 18px;
}

.profile-preview-stats{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.profile-stat{
    padding: 14px;
    border-radius: 18px;
    background: rgba(191, 239, 228, 0.34);
    border: 1px solid rgba(28, 152, 237, 0.10);
}

.profile-stat-value{
    display: block;
    font-family: var(--poppins);
    font-size: 28px;
    font-weight: 700;
    color: var(--8);
    line-height: 1;
}

.profile-stat-label{
    display: block;
    margin-top: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--9);
}

.profile-preview-group + .profile-preview-group{
    margin-top: 16px;
}

/* Phone-only "Shopping for" dropdown trigger - hidden on desktop, where the full
   profile list is already visible in the sidebar. See the 992px breakpoint below
   for the collapsed/expanded states of .profile-sidebar-body. */
.profile-mobile-toggle{
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(24, 39, 54, 0.12);
    border-radius: 16px;
    background: var(--hard-white, #fff);
    color: var(--8);
    font-family: var(--garet);
    font-size: 16px;
    font-weight: 700;
    text-align: left;
}

.profile-mobile-toggle strong{
    color: var(--3);
}

.profile-mobile-toggle-icon{
    transition: transform .18s ease;
}

.profile-mobile-toggle[aria-expanded="true"] .profile-mobile-toggle-icon{
    transform: rotate(180deg);
}

.profile-preview-label{
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--9);
}

.profile-chip-row,
.product-meta-row{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-chip,
.product-tag{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(24, 39, 54, 0.08);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--8);
}

.profile-chip.is-neutral{
    background: rgba(255,255,255,0.62);
    color: var(--9);
}

.product-tag{
    background: rgba(191, 239, 228, 0.30);
}

.product-tag-soft{
    background: rgba(248, 197, 246, 0.26);
}

.shop-hero{
    text-align: center;
    margin-bottom: 20px;
    background-image: url('../images/shop-bg.svg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 600px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shop-promo-banner{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    margin-bottom: 24px;
    padding: 20px 24px;
    border-radius: 22px;
    overflow: hidden;
    background-image: url('../images/banner-background-shop.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
}

.shop-promo-banner::before{
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 14, 0.45);
}

.shop-promo-banner-text{
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 720px;
    color: var(--10);
    font-family: var(--garet-heavy);
    font-size: 22px;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.shop-header{
    text-align: left;
}

.shop-page-title{
    font-family: 'SloopScriptPro', cursive;
    font-size: 80px;
    font-weight: 700;
    letter-spacing: .5px;
    margin: 0 0 10px;
}

.shop-subtitle{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    color: var(--9);
}

.shop-summary-sep{
    font-size: 12px;
}

/* Categories row */
.shop-categories{
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding: 6px 0;
}

.shop-category{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    text-decoration: none;
    color: var(--9);
    background: transparent;
    border: 0;
    font-family: var(--garet);
    font-size: 20px;
    font-weight: 600;
    transition: color .15s ease, border-color .15s ease;
    border-bottom: 2px solid transparent;
}

.shop-category:hover{
    color: var(--8);
}

.shop-category.active{
    color: var(--8);
    border-bottom-color: var(--3);
}

/* Scroll-hint arrow is phone-only (see the 992px breakpoint) - keep it out of
   the desktop layout entirely since categories don't scroll there. */
.shop-categories-fade{
    display: none;
}

/* Filters */
.filter-panel{
    background: var(--10);
    border: 1px solid var(--13);
}

.filter-panel .form-label{
    color: var(--8);
}

.filter-panel .form-control{
    border-color: var(--15);
}

.filter-panel .form-control:focus{
    border-color: var(--14);
    box-shadow: none;
}

.filter-list label{
    color: var(--8);
}

/* Product cards */
.product-card{
    border: 0;
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(6,10,14,0.10);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.product-item.is-profile-match .product-card{
    box-shadow: 0 18px 38px rgba(255, 17, 103, 0.16);
    transform: translateY(-2px);
}

/* No opacity dimming here: the profile-match scoring in shop.php's JS relies on
   per-profile categories/colors/keywords that are never populated server-side,
   so every product always evaluated as "not matched" and this used to fog out
   the entire grid whenever any profile besides "Myself" was selected. */

.product-card .card-body{
    text-align: center;
    padding: 18px 18px 16px;
}

.product-img-wrap{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 0;
}

.product-img-wrap{
    background: linear-gradient(180deg, var(--10), var(--10));
}

.product-img{
    width: 100%;
    height: 210px;
    border-radius: 18px;
    object-fit: cover;
    background: var(--16);
    border: 0;
    box-shadow: 0 10px 20px rgba(6,10,14,0.08);
}

.product-card .card-title{
    font-family: var(--garet);
    font-weight: 700;
    color: var(--8);
}

.product-meta-row{
    justify-content: center;
    margin-bottom: 10px;
}

.profile-match-note{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 17, 103, 0.10);
    color: var(--3);
    font-family: var(--poppins);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.availability{
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.availability .dot{
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--14);
}

.price{
    font-family: var(--poppins);
    font-weight: 600;
    color: var(--8);
}

.btn.btn-cart{
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    background: var(--6);
    border: 1px solid var(--6);
    color: var(--10);
    font-family: var(--poppins);
    font-weight: 700;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn.btn-cart:hover{
    background: var(--16);
    color: var(--8);
    border-color: var(--13);
}

.btn.btn-cart.is-added{
    background: #2e7d32;
    border-color: #2e7d32;
    color: var(--10);
}

.btn.btn-cart.is-added:hover{
    background: #276b2b;
    border-color: #276b2b;
    color: var(--10);
}

.search{
    width: 220px;
    border-radius: 15px;
    padding: 5px 8px;
    border: 1px solid var(--3);
}

.search:active{
    border: 1px solid var(--13) !important;
    outline: 1px solid var(--13) !important;
}

.search:focus{
   border: 1px solid var(--13);
   outline: 1px solid var(--13) !important;
}

/* Same pink gradient treatment as .shop-add-profile-btn / #profile-modal .btn-primary
   (see shop.php's inline styles) so Search and Match Preferences read as the site's
   one "primary action" look rather than a separate blue button style. */
.search-button{
    padding: 7px 18px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--3), #ff5b97);
    border: 1px solid transparent;
    color: var(--10);
    font-family: var(--poppins);
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 22px rgba(255, 17, 103, 0.22);
    transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}

.search-button:hover{
    background: linear-gradient(135deg, #ff0a61, #ff4c8b);
    box-shadow: 0 14px 26px rgba(255, 17, 103, 0.30);
    color: var(--10);
    transform: translateY(-1px);
}

.search-button:active{
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(255, 17, 103, 0.24);
}

.search-button:focus-visible{
    outline: 2px solid var(--10);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 17, 103, 0.28);
}

@media (max-width: 576px){
    .shop-layout{
        gap: 24px;
    }

    .profile-sidebar-card{
        padding: 20px;
        border-radius: 24px;
    }

    .profile-preview-stats{
        grid-template-columns: 1fr;
    }

    /* Two product cards per row on phone (see the col-6 grid class in shop.php) -
       shrink the image and tighten spacing/type so a half-width card doesn't feel
       cramped or force text to wrap awkwardly. */
    #productGrid{
        --bs-gutter-x: 0.75rem;
    }

    .product-img-wrap{
        padding: 10px 10px 0;
    }

    .product-img{
        height: 120px;
        border-radius: 14px;
    }

    .product-card .card-body{
        padding: 12px 12px 14px;
    }

    .product-card .card-title{
        font-size: 15px;
        line-height: 1.25;
    }

    .product-tag{
        min-height: 24px;
        padding: 4px 9px;
        font-size: 10px;
    }

    .profile-match-note{
        padding: 4px 9px;
        font-size: 10px;
    }

    .price{
        font-size: 14px;
    }

    .btn.btn-cart{
        padding: 8px 10px;
        font-size: 12px;
    }

    .shop-hero{
        background-image: url('../images/add-to-cart-phone.png');
        height: 260px;
        width: 100%;
    }

    .shop-promo-banner{
        min-height: 90px;
        margin-bottom: 18px;
        padding: 16px 18px;
        border-radius: 16px;
    }

    .shop-promo-banner-text{
        font-size: 15px;
        line-height: 1.35;
    }
}

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

    .profile-sidebar{
        position: static;
    }

    .shop-header{
        text-align: center;
    }

    .shop-categories,
    .shop-subtitle{
        justify-content: center;
    }

    /* Collapse the profile list behind the dropdown toggle so shoppers land
       closer to the products instead of scrolling past the full list first. */
    .profile-sidebar-kicker,
    .profile-sidebar-title{
        display: none;
    }

    .profile-mobile-toggle{
        display: flex;
        margin-top: 0;
    }

    .profile-sidebar-body{
        display: none;
    }

    .profile-sidebar-body.is-open{
        display: block;
        margin-top: 14px;
    }

    /* Category chips scroll horizontally on one line instead of wrapping across
       several rows, which otherwise pushes the product grid further down. */
    .shop-categories{
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 4px;
    }

    .shop-categories::-webkit-scrollbar{
        display: none;
    }

    .shop-category{
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* "More categories" hint - a fading arrow over the right edge of the scroll
       row, shown only while there's more to scroll to (see updateCategoriesFade
       in shop.php's JS, which toggles .is-at-end). */
    .shop-categories-wrap{
        position: relative;
    }

    .shop-categories-fade{
        display: flex;
        align-items: center;
        justify-content: flex-end;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 4px;
        width: 44px;
        padding-right: 2px;
        background: linear-gradient(to right, transparent, var(--10) 60%);
        color: var(--3);
        font-size: 26px;
        font-weight: 700;
        line-height: 1;
        pointer-events: none;
        opacity: 1;
        transition: opacity .2s ease;
    }

    .shop-categories-wrap.is-at-end .shop-categories-fade{
        opacity: 0;
    }
}