/* Phase 7A Wishlist */
.product-media-link {
    display: block;
    height: 100%;
}
.wishlist-toggle-form {
    margin: 0;
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 4;
}
.wishlist-toggle {
    align-items: center;
    background: rgba(255, 250, 246, 0.92);
    border: 1px solid rgba(95, 11, 76, 0.18);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(63, 38, 49, 0.16);
    color: var(--plum);
    cursor: pointer;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    padding: 0;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    width: 38px;
}
.wishlist-toggle:hover { transform: translateY(-1px); }
.wishlist-toggle svg,
.wishlist-icon {
    fill: none;
    height: 20px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 20px;
}
.wishlist-toggle.is-active {
    background: var(--plum);
    color: #fffaf6;
}
.nav-actions .wishlist-link {
    align-items: center;
    aspect-ratio: 1;
    background: #fffaf6;
    border-color: rgba(216, 180, 106, 0.72);
    border-radius: 50%;
    color: var(--plum);
    display: inline-flex;
    justify-content: center;
    min-height: 46px;
    padding: 0;
    position: relative;
    width: 46px;
}
.nav-actions .wishlist-link:hover {
    background: #f6e8e5;
    border-color: var(--champagne);
}
.wishlist-count {
    align-items: center;
    background: var(--champagne);
    border: 2px solid #fffaf6;
    border-radius: 999px;
    color: #251922;
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 5px;
    position: absolute;
    right: -5px;
    top: -6px;
}
.wishlist-detail-form {
    margin: 18px 0 12px;
}
.wishlist-detail-button.is-active {
    background: var(--plum);
    border-color: var(--plum);
    color: #fffaf6;
}
.wishlist-page .section-head {
    align-items: end;
}
.wishlist-empty {
    text-align: center;
}
@media (max-width: 760px) {
    .nav-actions .wishlist-link {
        justify-self: center;
        min-height: 48px;
        padding: 0;
        width: 48px;
    }
    .wishlist-toggle {
        height: 36px;
        width: 36px;
    }
}
.product-review-section { display: grid; gap: 20px; margin-top: 24px; }
.review-section-head { align-items: center; display: flex; gap: 16px; justify-content: space-between; }
.review-section-head h2 { color: var(--plum); font-size: 24px; margin: 2px 0 0; }
.review-average-card { background: #fff3ee; border: 1px solid var(--line); display: grid; justify-items: center; min-width: 116px; padding: 12px; }
.review-average-card strong { color: var(--plum); font-size: 28px; line-height: 1; }
.review-average-card span, .review-average-card small { color: var(--muted); font-size: 12px; font-weight: 800; }
.review-summary-grid { display: grid; gap: 18px; grid-template-columns: minmax(240px, 0.45fr) minmax(260px, 0.55fr); }
.review-distribution { display: grid; gap: 8px; }
.review-bar-row { align-items: center; display: grid; gap: 9px; grid-template-columns: 34px 1fr 34px; }
.review-bar-row span, .review-bar-row small { color: var(--muted); font-size: 12px; font-weight: 800; }
.review-bar { background: #f2e4df; height: 9px; overflow: hidden; }
.review-bar i { background: var(--champagne); display: block; height: 100%; }
.review-action-panel { background: #fffaf6; border: 1px solid var(--line); padding: 16px; }
.review-action-panel p, .review-status-note { color: var(--muted); font-size: 13px; font-weight: 700; }
.review-form textarea { min-height: 110px; }
.review-delete-form { margin-top: 10px; }
.review-list-head { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; padding-top: 16px; }
.review-list-head h3 { color: var(--plum); font-size: 18px; margin: 0; }
.review-list-head select { min-height: 40px; min-width: 180px; }
.review-list { display: grid; gap: 12px; }
.review-card { background: #fffaf6; border: 1px solid var(--line); padding: 16px; }
.review-card-head { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.review-card-head strong { color: var(--ink); font-size: 14px; }
.review-card p { color: var(--ink); font-size: 14px; line-height: 1.6; margin: 10px 0; }
.review-stars { color: #d8a932; font-size: 15px; font-weight: 900; letter-spacing: 0; white-space: nowrap; }
.review-stars span { color: #d8c8be; }
.review-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.review-meta span { background: #fff3ee; border: 1px solid var(--line); color: var(--rose-deep); font-size: 11px; font-weight: 900; padding: 4px 7px; }
.review-admin-summary { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.review-admin-stat { background: #fffaf6; border: 1px solid var(--line); color: var(--plum); display: grid; gap: 4px; padding: 14px; }
.review-admin-stat.active { border-color: var(--champagne); box-shadow: inset 0 -3px 0 var(--champagne); }
.review-admin-stat strong { font-size: 24px; }
.review-admin-stat span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.review-admin-list { display: grid; gap: 14px; }
.review-admin-card { border: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: minmax(220px, 0.32fr) minmax(260px, 1fr) minmax(220px, 0.34fr); padding: 14px; }
.review-admin-card p { color: var(--ink); font-size: 14px; line-height: 1.55; margin: 8px 0; }
.review-admin-actions { display: grid; gap: 10px; }
.review-admin-actions label { color: var(--muted); display: grid; gap: 6px; font-size: 12px; font-weight: 800; }
.review-admin-actions input { min-height: 38px; }
@media (max-width: 900px) {
    .review-summary-grid, .review-admin-summary, .review-admin-card { grid-template-columns: 1fr; }
    .review-section-head, .review-list-head { align-items: stretch; flex-direction: column; }
    .review-average-card { justify-items: start; }
}
/* Phase 8 Sales & Marketing */
.summary-line.discount strong,
.summary-line.discount span { color: var(--rose-deep); }
.coupon-box { border-top: 1px solid var(--line); display: grid; gap: 10px; margin-top: 16px; padding-top: 16px; }
.coupon-box label { display: grid; gap: 8px; }
.coupon-box label span { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.coupon-box input { min-height: 44px; }
.coupon-box button { background: var(--champagne); border: 0; color: #251922; cursor: pointer; font-weight: 900; padding: 0 18px; }
.text-button { background: transparent; border: 0; color: var(--rose-deep); cursor: pointer; font-weight: 900; padding: 8px 0; text-align: left; }
.marketing-hint { background: #fff3ee; border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 800; margin-top: 12px; padding: 10px 12px; }
.marketing-card-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.marketing-card, .reward-panel { background: #fffaf6; border: 1px solid var(--line); display: grid; gap: 10px; padding: 20px; }
.marketing-card span, .reward-panel span, .muted-copy { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.marketing-card h2 { color: var(--plum); font-size: 24px; margin: 0; }
.marketing-card p, .reward-panel p { color: var(--muted); line-height: 1.55; margin: 0; }
.marketing-card strong, .reward-panel strong { color: var(--rose-deep); font-size: 22px; }
.reward-panel input { background: #fff3ee; border: 1px solid var(--line); color: var(--ink); min-height: 44px; padding: 0 12px; }
.profile-reward-row { align-items: center; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; padding-top: 16px; }
.profile-reward-row span { color: var(--muted); font-weight: 800; }
.marketing-metric-grid { margin-bottom: 20px; }
.compact-form { gap: 12px; }
.mini-list { display: grid; gap: 10px; margin-top: 16px; }
.mini-list > div { background: #fff3ee; border: 1px solid var(--line); display: grid; gap: 4px; padding: 12px; }
.mini-list span, .mini-list small { color: var(--muted); font-size: 12px; font-weight: 800; }
@media (max-width: 900px) {
    .marketing-card-grid { grid-template-columns: 1fr; }
    .coupon-box label span { grid-template-columns: 1fr; }
}
/* UI polish: compact header, category drawer, review ratings */
@media (min-width: 1041px) {
    .navbar {
        gap: 10px;
        grid-template-columns: 88px minmax(0, 1fr) auto;
        padding: 8px 18px;
    }
    .brand-mark {
        height: 82px;
        width: 82px;
    }
    .nav-center {
        gap: clamp(10px, 0.9vw, 16px);
        justify-content: center;
        padding: 0 2px;
    }
    .nav-center a {
        font-size: clamp(12px, 0.85vw, 14px);
        line-height: 1.14;
    }
    .nav-actions {
        gap: 5px;
    }
    .nav-actions a {
        font-size: 12px;
        min-height: 38px;
        padding: 6px 9px;
    }
    .language-form select {
        font-size: 12px;
        max-width: 78px;
        min-height: 38px;
        padding: 0 6px;
    }
    .nav-actions .customer-greeting {
        max-width: 96px;
    }
    .nav-actions .cart-link,
    .nav-actions .wishlist-link {
        min-height: 42px;
        width: 42px;
    }
    .cart-icon,
    .wishlist-icon {
        height: 21px;
        width: 21px;
    }
}

@media (min-width: 1041px) and (max-width: 1320px) {
    .navbar {
        grid-template-columns: 78px minmax(0, 1fr) auto;
        padding: 7px 14px;
    }
    .brand-mark {
        height: 72px;
        width: 72px;
    }
    .nav-center {
        gap: 9px;
        justify-content: flex-start;
    }
    .nav-center a {
        font-size: 12px;
    }
    .nav-actions a {
        min-height: 36px;
        padding: 6px 8px;
    }
    .nav-actions .customer-greeting {
        max-width: 84px;
    }
    .nav-actions .cart-link,
    .nav-actions .wishlist-link {
        min-height: 40px;
        width: 40px;
    }
}

.all-categories-panel {
    max-height: 100dvh;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.all-categories-panel::-webkit-scrollbar {
    width: 7px;
}
.all-categories-panel::-webkit-scrollbar-thumb {
    background: rgba(92, 53, 75, 0.28);
}
.category-drawer-head {
    position: sticky;
    top: 0;
    z-index: 2;
}
.category-menu-title {
    margin-top: 4px;
}
.category-menu-grid {
    gap: 0;
    padding-bottom: 12px;
}
.category-menu-group summary {
    min-height: 36px;
    padding-bottom: 6px;
    padding-top: 6px;
}
.category-menu-children {
    gap: 0;
    padding-bottom: 4px;
    padding-left: 10px;
}
.all-categories-panel .category-menu-button {
    min-height: 32px;
}
.all-categories-panel .category-menu-button.depth-1 {
    min-height: 30px;
    padding-left: 14px;
}
.all-categories-panel .category-menu-button.depth-2 {
    min-height: 28px;
    padding-left: 24px;
}

.review-summary-grid {
    grid-template-columns: minmax(180px, 0.34fr) minmax(300px, 0.66fr);
}
.review-average-card {
    min-width: 92px;
    padding: 10px;
}
.review-average-card strong {
    font-size: 22px;
}
.review-average-card span,
.review-average-card small {
    font-size: 11px;
}
.review-distribution {
    gap: 5px;
}
.review-bar-row {
    gap: 7px;
    grid-template-columns: 28px 1fr 24px;
}
.review-bar-row span,
.review-bar-row small {
    font-size: 11px;
}
.review-bar {
    height: 6px;
}

@media (max-width: 720px) {
    .all-categories-panel {
        max-width: min(360px, 88vw);
        padding: 0 14px 14px;
        width: min(360px, 88vw);
    }
    .category-drawer-head {
        margin: 0 -14px 8px;
        min-height: 58px;
        padding: 0 14px;
    }
    .category-drawer-head strong {
        font-size: 16px;
    }
    .category-drawer-head button {
        height: 38px;
        width: 38px;
    }
    .all-categories-panel a {
        font-size: 13px;
    }
    .category-menu-heading {
        font-size: 12px;
        padding: 8px 10px 4px;
    }
    .category-menu-group summary {
        font-size: 13px;
    }
}

/* Mobile/app layout polish - visual only, no checkout/payment behavior changes. */
@media (max-width: 760px) {
    .navbar {
        align-items: center;
        justify-items: stretch;
        overflow: hidden;
    }
    .brand {
        justify-self: center;
    }
    .nav-center {
        display: flex !important;
        gap: 8px;
        justify-content: flex-start;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto !important;
        padding: 2px 0 8px;
        scrollbar-width: none;
        width: 100%;
    }
    .nav-center::-webkit-scrollbar {
        display: none;
    }
    .nav-center a {
        align-items: center;
        background: #fffaf6;
        border: 1px solid rgba(95, 11, 76, 0.14);
        display: inline-flex;
        flex: 0 0 auto;
        font-size: 12px;
        justify-content: center;
        line-height: 1.15;
        min-height: 36px;
        padding: 8px 12px;
        text-align: center;
        white-space: nowrap;
        width: auto;
    }
    .nav-center a.active::after {
        display: none;
    }
    .nav-actions {
        align-items: center;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px;
        justify-content: flex-start;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        padding: 0 2px 4px;
        scrollbar-width: none;
        white-space: nowrap;
        width: 100%;
    }
    .nav-actions::-webkit-scrollbar {
        display: none;
    }
    .nav-actions a {
        align-items: center;
        display: inline-flex;
        flex: 0 0 auto;
        font-size: 12px;
        justify-content: center;
        line-height: 1.12;
        min-height: 38px;
        padding: 7px 10px;
        text-align: center;
        white-space: normal;
        width: auto;
    }
    .language-form {
        flex: 0 0 64px;
    }
    .language-form select {
        font-size: 12px;
        min-height: 38px;
        padding: 0 8px;
        width: 100%;
    }
    .customer-greeting {
        max-width: 110px;
    }
    .nav-actions .cart-link,
    .nav-actions .wishlist-link {
        flex: 0 0 40px;
        min-height: 40px;
        padding: 0;
        width: 40px;
    }
    .cart-icon,
    .wishlist-icon {
        height: 20px;
        width: 20px;
    }
    .search-row {
        align-items: center;
        display: grid;
        gap: 8px;
        grid-template-columns: 86px minmax(0, 1fr);
        padding: 10px 14px;
    }
    .all-categories-link {
        font-size: 12px;
        min-height: 40px;
        padding: 0 10px;
        width: 100%;
    }
    .search-shell {
        grid-template-columns: minmax(0, 1fr) 82px;
        min-height: 40px;
        width: 100%;
    }
    .search-shell input {
        font-size: 13px;
        min-width: 0;
        padding: 0 12px;
    }
    .search-shell button {
        font-size: 13px;
        min-height: 40px;
        padding: 0 12px;
        width: 100%;
    }
    .all-categories-panel {
        max-width: min(370px, 90vw);
        padding-bottom: 16px;
        width: min(370px, 90vw);
    }
}

@media (max-width: 420px) {
    .search-row {
        grid-template-columns: 76px minmax(0, 1fr);
    }
    .search-shell {
        grid-template-columns: minmax(0, 1fr) 70px;
    }
    .nav-center a,
    .nav-actions a {
        font-size: 11px;
    }
}

/* Product page polish - visual only, no payment/checkout/order behavior changes. */
body:not(.is-admin) .shop-products-head {
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
}

body:not(.is-admin) .shop-products-head h1 {
    letter-spacing: 0;
    margin-bottom: 8px;
}

body:not(.is-admin) .shop-products-head p {
    max-width: 980px;
}

body:not(.is-admin) .product-grid {
    align-items: stretch;
    gap: 18px;
}

body:not(.is-admin) .product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

body:not(.is-admin) .product-card:hover {
    transform: translateY(-2px);
}

body:not(.is-admin) .product-media {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #fff7f1, #f7e7df);
    height: auto;
    overflow: hidden;
}

body:not(.is-admin) .product-media img,
body:not(.is-admin) .product-media video {
    object-position: center;
    transition: transform 0.25s ease;
}

body:not(.is-admin) .product-card:hover .product-media img,
body:not(.is-admin) .product-card:hover .product-media video {
    transform: scale(1.025);
}

body:not(.is-admin) .product-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 14px;
}

body:not(.is-admin) .product-body small {
    display: block;
    letter-spacing: 0;
    margin-bottom: 6px;
}

body:not(.is-admin) .product-body h3 {
    font-size: 14px;
    line-height: 1.38;
    margin: 0 0 8px;
    min-height: 40px;
}

body:not(.is-admin) .product-body h3 a {
    color: inherit;
    text-decoration: none;
}

body:not(.is-admin) .rating {
    font-size: 11px;
    line-height: 1.35;
    margin-bottom: 10px;
}

body:not(.is-admin) .price-line {
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

body:not(.is-admin) .price {
    font-size: 18px;
    line-height: 1.2;
}

body:not(.is-admin) .product-card .btn {
    margin-top: 2px;
}

body:not(.is-admin) .badge {
    border: 1px solid rgba(255, 255, 255, 0.46);
    box-shadow: 0 8px 18px rgba(74, 53, 65, 0.12);
}

body:not(.is-admin) .wishlist-toggle {
    backdrop-filter: blur(8px);
}

body:not(.is-admin) .catalog-filter-form {
    box-shadow: 0 10px 26px rgba(81, 55, 46, 0.06);
}

body:not(.is-admin) .product-detail-layout {
    align-items: start;
}

body:not(.is-admin) .product-detail-grid {
    gap: 24px;
    grid-template-columns: minmax(280px, 0.82fr) minmax(300px, 0.68fr);
}

body:not(.is-admin) .product-gallery-panel,
body:not(.is-admin) .product-detail-grid > .panel {
    box-shadow: 0 12px 30px rgba(81, 55, 46, 0.07);
}

body:not(.is-admin) .product-gallery-main {
    background: linear-gradient(135deg, #fff7f1, #f7e7df);
    max-height: 520px;
}

body:not(.is-admin) .product-gallery-strip {
    gap: 8px;
}

body:not(.is-admin) .product-gallery-strip img,
body:not(.is-admin) .product-gallery-strip video {
    background: #fffaf6;
}

body:not(.is-admin) .product-trust-strip {
    gap: 8px;
    margin: 16px 0;
}

body:not(.is-admin) .product-review-section {
    margin-top: 24px;
}

body:not(.is-admin) .review-summary-grid {
    align-items: start;
}

body:not(.is-admin) .review-bar-row {
    gap: 8px;
}

body:not(.is-admin) .review-bar-row span,
body:not(.is-admin) .review-bar-row small {
    font-size: 11px;
}

@media (max-width: 980px) {
    body:not(.is-admin) .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body:not(.is-admin) .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body:not(.is-admin) .shop-products-head {
        align-items: start;
        gap: 10px;
        margin-bottom: 16px;
    }

    body:not(.is-admin) .shop-products-head p {
        line-height: 1.45;
    }

    body:not(.is-admin) .product-grid {
        gap: 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body:not(.is-admin) .product-body {
        padding: 11px;
    }

    body:not(.is-admin) .product-body h3 {
        font-size: 12px;
        min-height: 34px;
    }

    body:not(.is-admin) .rating {
        font-size: 10px;
    }

    body:not(.is-admin) .price {
        font-size: 15px;
    }

    body:not(.is-admin) .product-card .btn {
        font-size: 11px;
        min-height: 34px;
        padding: 8px 10px;
    }

    body:not(.is-admin) .product-gallery-main {
        max-height: 420px;
    }
}

@media (max-width: 430px) {
    body:not(.is-admin) .product-grid {
        gap: 10px;
    }

    body:not(.is-admin) .product-media {
        aspect-ratio: 1 / 1;
    }

    body:not(.is-admin) .product-body small,
    body:not(.is-admin) .rating {
        font-size: 9px;
    }

    body:not(.is-admin) .product-body h3 {
        font-size: 11px;
        min-height: 32px;
    }

    body:not(.is-admin) .product-detail-grid > .panel,
    body:not(.is-admin) .product-review-section {
        padding: 16px;
    }
}

/* Return/replacement final flow polish */
.return-order-picker {
    display: grid;
    gap: 12px;
}

.return-order-option {
    align-items: center;
    background: #fffaf6;
    border: 1px solid var(--line);
    color: var(--ink);
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    padding: 14px 16px;
    text-decoration: none;
}

.return-order-option:hover,
.return-order-option:focus {
    border-color: var(--gold);
    box-shadow: 0 10px 24px rgba(78, 53, 67, 0.08);
}

.return-order-option small {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.return-order-option strong {
    color: var(--plum);
    display: block;
    font-size: 15px;
}

.return-order-action {
    color: var(--rose);
    font-weight: 900;
    justify-self: end;
}

@media (max-width: 760px) {
    .return-order-option {
        grid-template-columns: 1fr;
    }

    .return-order-action {
        justify-self: start;
    }
}
