:root{
    --store-primary:var(--marine-teal, #3D7A82);
    --store-dark:var(--deep-teal, #1B4954);
    --store-accent:var(--brass, #C8923A);
    --store-success:var(--signal-green, #1F7A44);
    --store-danger:var(--signal-red, #C23B33);
    --store-text:var(--ink, #0F2027);
    --store-muted:#5B6A70;
    --store-bg:var(--steel-50, #F4F6F7);
    --store-border:var(--steel-200, #DCE2E5);
    --store-white:#ffffff;
}

.store-container{
    width:min(1180px,94%);
    margin:28px auto 56px;
}

/* PAGE TITLE
   Used on cart, checkout, contact, products, request-quote pages
   via class="page-title".
   Was referenced on 7 pages but never defined anywhere —
   caused h1 elements to fall back to unstyled browser defaults. */

.page-title{
    font-size:30px;
    font-weight:800;
    color:var(--store-dark);
    margin:0 0 22px;
    padding-bottom:14px;
    border-bottom:2px solid var(--store-border);
}

.store-card{
    background:var(--store-white);
    border:1px solid var(--store-border);
    border-radius:8px;
    box-shadow:0 8px 24px rgba(17,31,39,.06);
}

.product-breadcrumb{
    display:flex;
    align-items:center;
    gap:9px;
    flex-wrap:wrap;
    margin:0 0 18px;
    color:var(--store-muted);
    font-size:14px;
    font-weight:600;
}

.product-breadcrumb a{
    color:var(--store-dark);
}

.product-breadcrumb a:hover{
    color:var(--store-primary);
}

.product-hero{
    display:grid;
    grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr);
    gap:26px;
    align-items:start;
}

.product-gallery-panel{
    position:sticky;
    top:148px;
    display:grid;
    gap:14px;
}

.product-gallery-panel,
.product-summary,
.detail-section,
.support-band{
    min-width:0;
}

.product-detail{
    display:grid;
    grid-template-columns:minmax(320px,1fr) minmax(320px,1fr);
    gap:28px;
    align-items:start;
}

.product-gallery{
    display:grid;
    grid-template-columns:78px 1fr;
    gap:14px;
}

.thumb-list{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.thumb-btn{
    width:78px;
    height:78px;
    border:1px solid var(--store-border);
    background:#fff;
    border-radius:8px;
    cursor:pointer;
    padding:4px;
    transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.thumb-btn:hover{
    transform:translateY(-1px);
    border-color:rgba(79,127,134,.55);
}

.thumb-btn.active{
    border-color:var(--store-primary);
    box-shadow:0 0 0 2px rgba(79,127,134,.16);
}

.thumb-btn img,
.main-image img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.main-image{
    position:relative;
    min-height:560px;
    height:clamp(480px,52vw,620px);
    background:
        linear-gradient(145deg,rgba(255,255,255,.96),rgba(245,248,250,.98));
    border:1px solid var(--store-border);
    border-radius:16px;
    overflow:hidden;
    cursor:zoom-in;
    box-shadow:0 18px 45px rgba(17,31,39,.08);
}

.main-image img{
    transition:transform .18s ease;
    transform-origin:center;
    padding:28px;
}

.gallery-badge{
    position:absolute;
    top:18px;
    left:18px;
    z-index:2;
    background:linear-gradient(135deg,#f8c76b,#d99618);
    color:#18242b;
    border-radius:999px;
    padding:8px 13px;
    font-size:13px;
    font-weight:900;
    box-shadow:0 12px 24px rgba(217,150,24,.24);
}

.gallery-note{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:14px 16px;
    background:rgba(255,255,255,.86);
    border:1px solid rgba(223,229,234,.9);
    border-radius:12px;
    color:var(--store-muted);
    box-shadow:0 10px 24px rgba(17,31,39,.05);
}

.gallery-note strong{
    color:var(--store-dark);
    white-space:nowrap;
}

.product-summary{
    padding:28px;
    border-radius:16px;
    position:relative;
    overflow:hidden;
}

.product-summary::before{
    content:"";
    position:absolute;
    inset:0 0 auto;
    height:5px;
    background:linear-gradient(90deg,var(--store-primary),var(--store-dark),#d8a12d);
}

.summary-kicker{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:14px;
}

.summary-kicker span{
    display:inline-flex;
    align-items:center;
    min-height:30px;
    padding:6px 11px;
    border-radius:999px;
    background:#eef6f7;
    color:var(--store-dark);
    font-size:13px;
    font-weight:800;
}

.detail-title{
    font-family:var(--font-display, inherit);
    font-weight:800;
    font-size:clamp(28px,3vw,42px);
    line-height:1.12;
    color:var(--ink, var(--store-text));
    margin:0 0 14px;
    letter-spacing:-.01em;
}

.detail-intro{
    color:var(--store-muted);
    line-height:1.65;
    margin:0 0 18px;
}

.product-highlights{
    list-style:none;
    margin:0 0 20px;
    padding:14px 16px;
    background:var(--store-bg);
    border:1px solid var(--store-border);
    border-radius:10px;
    display:grid;
    gap:9px;
}

.product-highlights li{
    display:flex;
    align-items:flex-start;
    gap:9px;
    font-size:13.5px;
    color:var(--store-text);
    line-height:1.4;
}

.product-highlights li svg{
    flex-shrink:0;
    margin-top:1px;
    color:var(--store-success,#28a745);
}

.product-badges{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:9px;
    margin:0 0 22px;
}

.product-badges span{
    display:inline-flex;
    align-items:center;
    min-height:32px;
    padding:7px 11px;
    border-radius:8px;
    background:#f8fafb;
    border:1px solid var(--store-border);
    color:var(--store-text);
    font-size:13px;
    font-weight:800;
}

/* Part number treated as a stamped-plate detail — the design
   system's signature moment on the product page, distinguishing
   an exact part-number match from generic descriptive badges. */
.part-no-badge{
    background:var(--ink, #0F2027) !important;
    border-color:var(--ink, #0F2027) !important;
    color:#fff !important;
    font-size:12.5px !important;
    letter-spacing:.01em;
}

.product-badges .badge-success{
    background:#eaf7ef;
    border-color:#c5e8d0;
    color:var(--store-success);
}

.product-badges .badge-danger{
    background:#feeceb;
    border-color:#facbc7;
    color:var(--store-danger);
}

.price-row{
    display:flex;
    align-items:baseline;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:16px;
}

.sale-price{
    font-family:var(--font-mono, inherit);
    font-size:clamp(28px,3vw,38px);
    font-weight:600;
    letter-spacing:-.01em;
    color:var(--deep-teal, var(--store-dark));
}

.old-price{
    font-family:var(--font-mono, inherit);
    color:#7b858c;
    text-decoration:line-through;
}

.discount-badge{
    background:#fee7e4;
    color:var(--signal-red, var(--store-danger));
    font-weight:800;
    padding:5px 9px;
    border-radius:6px;
    font-size:13px;
}

.summary-divider{
    height:1px;
    background:linear-gradient(90deg,transparent,var(--store-border),transparent);
    margin:18px 0;
}

.stock-line{
    margin:16px 0;
    font-weight:800;
}

.stock-line.in{
    color:var(--store-success);
}

.stock-line.out{
    color:var(--store-danger);
}

.detail-meta{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin:18px 0;
    color:var(--store-muted);
}

.detail-meta span{
    display:block;
    background:#f8fafb;
    border:1px solid var(--store-border);
    border-radius:8px;
    padding:10px;
    color:var(--store-text);
    font-weight:700;
    min-width:0;
    overflow-wrap:anywhere;
}

.detail-meta strong{
    display:block;
    margin-bottom:4px;
    color:var(--store-muted);
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:0;
}

.purchase-tools{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:14px;
    align-items:end;
    margin:20px 0 0;
}

.field-label{
    display:block;
    margin-bottom:8px;
    color:var(--store-muted);
    font-size:13px;
    font-weight:800;
}

.qty-control{
    display:inline-flex;
    align-items:center;
    border:1px solid var(--store-border);
    border-radius:8px;
    overflow:hidden;
    background:#fff;
}

.qty-control button{
    width:42px;
    height:42px;
    border:0;
    background:#f3f6f7;
    font-size:20px;
    cursor:pointer;
}

.qty-control input{
    width:58px;
    height:42px;
    border:0;
    text-align:center;
    font-weight:800;
}

.support-mini{
    display:grid;
    gap:3px;
    padding:12px 14px;
    background:#f8fafb;
    border:1px solid var(--store-border);
    border-radius:8px;
    color:var(--store-muted);
    font-size:13px;
}

.support-mini strong{
    color:var(--store-dark);
}

.action-row{
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:12px;
    margin-top:20px;
    align-items:stretch;
}

.store-btn.outline{
    background:#fff;
    border:1.5px solid var(--store-border);
    color:var(--store-text);
}

.wishlist-heart-btn-lg{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    white-space:nowrap;
    min-width:90px;
}

.wishlist-heart-btn-lg svg{
    flex-shrink:0;
    color:var(--store-muted);
    transition:color .18s ease;
}

.wishlist-heart-btn-lg.saved,
.wishlist-heart-btn-lg.saved svg{
    color:var(--signal-red, #C23B33);
    border-color:var(--signal-red, #C23B33);
}

@media(max-width:560px){
    .action-row{
        grid-template-columns:1fr 1fr;
    }
    .wishlist-heart-btn-lg{
        grid-column:1 / -1;
    }
}

.store-btn{
    border:0;
    border-radius:10px;
    padding:14px 18px;
    font-weight:800;
    cursor:pointer;
    text-align:center;
    text-decoration:none;
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.store-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 10px 20px rgba(17,31,39,.12);
}

.store-btn.primary{
    background:linear-gradient(135deg,var(--store-primary),var(--store-dark));
    color:#fff;
    box-shadow:0 12px 24px rgba(79,127,134,.2);
}

.store-btn.buy{
    background:linear-gradient(135deg,#f8c76b,var(--store-accent));
    color:#1f2529;
    box-shadow:0 12px 24px rgba(245,166,35,.2);
}

.store-btn:disabled,
.store-btn[disabled]{
    cursor:not-allowed;
    opacity:.55;
    box-shadow:none;
    transform:none;
}

.buyer-confidence{
    display:grid;
    gap:5px;
    margin-top:18px;
    padding:14px 16px;
    border:1px solid rgba(79,127,134,.2);
    border-radius:12px;
    background:linear-gradient(135deg,rgba(79,127,134,.08),rgba(245,166,35,.09));
}

.buyer-confidence span,
.section-heading span,
.support-band span{
    color:#b47a10;
    font-size:12px;
    font-weight:900;
    letter-spacing:0;
    text-transform:uppercase;
}

.buyer-confidence strong{
    color:var(--store-dark);
    line-height:1.45;
}

/* =========================================
   PRODUCT PAGE — SHIPPING / RETURN ACCORDION
   Uses native <details>/<summary> — no extra UI framework,
   consistent with the rest of the frontend (Bootstrap is not
   used here). Content is admin-managed via config/policies.php.
========================================= */

.policy-accordion{
    margin-top:14px;
    border:1px solid var(--store-border);
    border-radius:12px;
    overflow:hidden;
}

.policy-item{
    border-bottom:1px solid var(--store-border);
    background:#fff;
}

.policy-item:last-child{
    border-bottom:0;
}

.policy-item summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:14px 16px;
    cursor:pointer;
    list-style:none;
    font-weight:700;
    font-size:14px;
    color:var(--store-dark);
    -webkit-tap-highlight-color:transparent;
}

.policy-item summary::-webkit-details-marker{
    display:none;
}

.policy-item-icon{
    position:relative;
    width:16px;
    height:16px;
    flex-shrink:0;
}

.policy-item-icon::before,
.policy-item-icon::after{
    content:"";
    position:absolute;
    background:var(--store-primary,#4F7F86);
    transition:transform .2s ease;
}

.policy-item-icon::before{
    top:7px; left:1px; width:14px; height:2px;
}

.policy-item-icon::after{
    top:1px; left:7px; width:2px; height:14px;
}

.policy-item[open] .policy-item-icon::after{
    transform:rotate(90deg);
    opacity:0;
}

.policy-item-body{
    padding:0 16px 16px;
    font-size:13.5px;
    line-height:1.6;
    color:var(--store-muted,#5a6771);
}

.policy-item-body p{
    margin:0 0 10px;
}

.policy-item-body a{
    color:var(--store-primary,#4F7F86);
    font-weight:700;
    text-decoration:none;
}

.policy-item-body a:hover{
    text-decoration:underline;
}

.trust-strip{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    margin:22px 0 26px;
}

.trust-strip div{
    padding:18px;
    background:#fff;
    border:1px solid var(--store-border);
    border-radius:14px;
    box-shadow:0 10px 24px rgba(17,31,39,.05);
}

.trust-strip strong{
    display:block;
    color:var(--store-dark);
    margin-bottom:6px;
}

.trust-strip span{
    color:var(--store-muted);
    line-height:1.5;
}

.product-info-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(340px,.78fr);
    gap:22px;
    align-items:start;
}

.detail-section{
    padding:24px;
    border-radius:14px;
}

.section-heading{
    margin-bottom:18px;
}

.section-heading h2{
    margin:5px 0 0;
    color:var(--store-dark);
    font-size:26px;
    line-height:1.18;
}

.section-heading.centered{
    text-align:center;
}

.rich-copy{
    color:var(--store-text);
    line-height:1.75;
}

.spec-list{
    display:grid;
    gap:10px;
    margin:0;
}

.spec-list div{
    display:grid;
    grid-template-columns:130px 1fr;
    gap:14px;
    align-items:start;
    padding:12px;
    background:#f8fafb;
    border:1px solid var(--store-border);
    border-radius:8px;
}

.spec-list dt{
    color:var(--store-muted);
    font-weight:800;
}

.spec-list dd{
    margin:0;
    color:var(--store-text);
    font-weight:800;
    overflow-wrap:anywhere;
}

.support-band{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:26px;
    margin-top:24px;
    padding:26px;
    border-radius:16px;
    background:
        linear-gradient(135deg,rgba(47,95,102,.96),rgba(24,36,43,.96)),
        var(--store-dark);
    color:#fff;
    box-shadow:0 18px 45px rgba(17,31,39,.16);
}

.support-band h2{
    margin:6px 0 8px;
    font-size:26px;
    line-height:1.2;
}

.support-band p{
    margin:0;
    color:rgba(255,255,255,.78);
    line-height:1.6;
    max-width:760px;
}

.support-band .store-btn{
    flex:0 0 auto;
    background:#fff;
    color:var(--store-dark);
    box-shadow:none;
}

.related-section{
    margin-top:34px;
}

.tabs{
    margin-top:28px;
}

.tab-buttons{
    display:flex;
    gap:8px;
    border-bottom:1px solid var(--store-border);
}

.tab-button{
    border:0;
    background:transparent;
    padding:14px 16px;
    font-weight:800;
    color:var(--store-muted);
    cursor:pointer;
    border-bottom:3px solid transparent;
}

.tab-button.active{
    color:var(--store-dark);
    border-bottom-color:var(--store-primary);
}

.tab-panel{
    display:none;
    padding:22px;
    line-height:1.7;
}

.tab-panel.active{
    display:block;
}

.related-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:18px;
}

.related-card{
    display:block;
    color:inherit;
    text-decoration:none;
    padding:14px;
}

.related-card img{
    width:100%;
    height:170px;
    object-fit:contain;
}

.related-card h3{
    font-size:15px;
    margin:10px 0 6px;
    color:var(--store-text);
}

.cart-layout{
    display:grid;
    grid-template-columns:1fr 340px;
    gap:18px;
    align-items:start;
}

.cart-items{
    overflow:hidden;
}

.cart-row{
    display:grid;
    grid-template-columns:96px 1fr auto;
    gap:16px;
    padding:18px;
    border-bottom:1px solid var(--store-border);
    align-items:center;
}

.cart-row img{
    width:96px;
    height:96px;
    object-fit:contain;
    border:1px solid var(--store-border);
    border-radius:8px;
}

.cart-row h3{
    margin:0 0 8px;
    font-size:17px;
}

.cart-price{
    font-weight:800;
    color:var(--store-dark);
}

.remove-btn{
    border:0;
    background:transparent;
    color:var(--store-danger);
    cursor:pointer;
    font-weight:800;
    margin-top:10px;
}

.summary-box{
    padding:20px;
    position:sticky;
    top:140px;
}

.summary-line{
    display:flex;
    justify-content:space-between;
    gap:16px;
    margin-bottom:12px;
}

.summary-total{
    border-top:1px solid var(--store-border);
    padding-top:14px;
    font-size:20px;
    font-weight:900;
}

.empty-state{
    text-align:center;
    padding:48px 18px;
    color:var(--store-muted);
}

.checkout-form{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
    padding:22px;
}

.checkout-form label{
    display:grid;
    gap:7px;
    font-weight:800;
    color:var(--store-text);
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea{
    width:100%;
    padding:12px;
    border:1px solid var(--store-border);
    border-radius:8px;
    font:inherit;
}

.checkout-form textarea,
.checkout-form .full{
    grid-column:1/-1;
}

/* =========================================
   SHARED PHONE INPUT (country code + number)
   Used by contact, request-quote, checkout, registration,
   and profile forms — see config/phone.php.
========================================= */
.mae-phone-field{
    display:grid;
    grid-template-columns:minmax(120px,150px) 1fr;
    gap:8px;
}

.mae-phone-field .mae-phone-country,
.mae-phone-field .mae-phone-number{
    width:100%;
    padding:12px;
    border:1px solid var(--store-border);
    border-radius:8px;
    font:inherit;
}

.mae-phone-field .mae-phone-country{
    padding-right:6px;
}

@media(max-width:520px){
    .mae-phone-field{
        grid-template-columns:1fr;
    }
}

.sticky-product-bar{
    display:none;
}

.mobile-cart{
    position:relative;
}

@media(max-width:900px){
    .product-hero,
    .product-info-grid,
    .product-detail,
    .cart-layout{
        grid-template-columns:1fr;
    }

    .product-gallery-panel,
    .product-gallery,
    .summary-box{
        position:static;
    }

    .trust-strip{
        grid-template-columns:1fr;
    }

    .support-band{
        align-items:flex-start;
        flex-direction:column;
    }

    .support-band .store-btn{
        width:100%;
    }

    .related-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

/* =========================================
   SHARED FORM MESSAGES
   Used by contact.php, request-quote.php,
   and the product review form.
========================================= */

.contact-success{
    background:#eafaf0;
    border:1px solid #bfe8cf;
    color:#1f7a44;
    padding:16px 18px;
    border-radius:10px;
    font-weight:600;
    margin-bottom:18px;
}

.contact-error{
    background:#fdecec;
    border:1px solid #f3bcbc;
    color:#9c2b2b;
    padding:16px 18px;
    border-radius:10px;
    font-weight:600;
    margin-bottom:18px;
}

/* =========================================
   PRODUCT REVIEWS
========================================= */

.star-row{
    display:inline-flex;
    gap:2px;
    color:#f5a623;
}

.rating-summary-link{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin:6px 0 10px;
    font-size:13.5px;
    font-weight:700;
    color:var(--store-text);
    text-decoration:none;
}

.rating-summary-link:hover{
    color:var(--store-primary);
}

.review-summary{
    display:flex;
    margin-bottom:18px;
}

.review-score{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.review-score strong{
    font-size:32px;
    color:var(--store-dark);
    line-height:1;
}

.review-score span{
    font-size:13px;
    color:var(--store-muted);
}

.review-list{
    display:grid;
    gap:18px;
    margin-bottom:28px;
}

.review-item{
    border-bottom:1px solid var(--store-border);
    padding-bottom:18px;
}

.review-item-head{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:8px;
}

.review-item-head strong{
    font-size:14.5px;
    color:var(--store-dark);
}

.review-item p{
    margin:0;
    font-size:14px;
    color:var(--store-text);
    line-height:1.7;
}

.review-empty{
    color:var(--store-muted);
    margin-bottom:24px;
}

.review-form{
    border-top:1px solid var(--store-border);
    padding-top:22px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.review-form h3{
    grid-column:1/-1;
    margin:0 0 4px;
    font-size:16px;
    color:var(--store-dark);
}

.review-form label{
    display:grid;
    gap:7px;
    font-weight:800;
    font-size:13.5px;
    color:var(--store-text);
}

.review-form input,
.review-form select,
.review-form textarea{
    width:100%;
    padding:11px 12px;
    border:1px solid var(--store-border);
    border-radius:8px;
    font:inherit;
}

.review-form textarea,
.review-form .full{
    grid-column:1/-1;
}

.review-form button{
    justify-self:start;
}

@media(max-width:640px){
    .review-form{
        grid-template-columns:1fr;
    }
}

@media(max-width:640px){
    .store-container{
        width:94%;
        margin-top:16px;
        padding-bottom:82px;
    }

    .product-gallery{
        grid-template-columns:1fr;
    }

    .thumb-list{
        order:2;
        flex-direction:row;
        overflow:auto;
    }

    .main-image{
        min-height:330px;
        height:330px;
        border-radius:12px;
    }

    .main-image img{
        padding:18px;
    }

    .product-summary{
        padding:18px;
    }

    .detail-title{
        font-size:22px;
    }

    .detail-meta,
    .purchase-tools,
    .action-row,
    .checkout-form{
        grid-template-columns:1fr;
    }

    .gallery-note{
        align-items:flex-start;
        flex-direction:column;
        gap:4px;
    }

    .trust-strip{
        margin:18px 0;
    }

    .detail-section,
    .support-band{
        padding:18px;
    }

    .spec-list div{
        grid-template-columns:1fr;
        gap:5px;
    }

    .cart-row{
        grid-template-columns:78px 1fr;
    }

    .cart-row img{
        width:78px;
        height:78px;
    }

    .cart-line-actions{
        grid-column:1/-1;
    }

    .sticky-product-bar{
        position:fixed;
        left:0;
        right:0;
        bottom:0;
        z-index:999;
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:10px;
        padding:10px;
        background:#fff;
        border-top:1px solid var(--store-border);
        box-shadow:0 -8px 20px rgba(17,31,39,.12);
    }
}
