/* Storefront controls and dynamic content. */
.skip-link { position: fixed; top: -100px; right: 16px; z-index: 100; padding: 12px 20px; background: #fff; color: var(--green); }
.skip-link:focus { top: 12px; }
#main-content:focus { outline: none; }
.home-categories .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
    .home-categories .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-categories .category-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.index .benefits.standard {
    position: relative;
    background: #f9f1e9;
}
.index .benefits.standard::before,
.index .benefits.standard::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10%;
    background-image:
        linear-gradient(var(--pattern-fade-direction), #f9f1e900 20%, #f9f1e9 100%),
        url('../images/storefront/benefits-pattern.png');
    background-position: center;
    background-size: 100% 100%, 200%;
    background-repeat: no-repeat;
    pointer-events: none;
}
.index .benefits.standard::before { left: 0; --pattern-fade-direction: to right; }
.index .benefits.standard::after { right: 0; --pattern-fade-direction: to left; }
.index .benefits.standard > div {
    position: relative;
    z-index: 1;
}
@media (max-width: 900px) {
    .index .benefits.standard::before,
    .index .benefits.standard::after { width: clamp(80px, 16vw, 140px); }
}
@media (max-width: 700px) {
    .index .benefits.standard {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        height: auto;
        align-items: stretch;
        padding: 18px 12px;
    }
    .index .benefits.standard > div {
        min-width: 0;
        flex-direction: column;
        justify-content: flex-start;
        gap: 9px;
        padding: 0 8px;
        text-align: center;
    }
    .index .benefits.standard svg {
        display: block;
        width: 30px;
        height: 30px;
    }
    .index .benefits.standard > div > span { width: 100%; }
    .index .benefits.standard b {
        display: block;
        font-size: 12px;
        line-height: 1.5;
    }
    .index .benefits.standard small {
        margin-top: 5px;
        font-size: 10px;
        line-height: 1.6;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
.tools .account-link svg { width: 34px; height: 34px; }
header nav { gap: 24px; }
@media (min-width: 1251px) {
    header nav { position: static; inset: auto; justify-content: flex-start; }
}
button:disabled, [aria-disabled="true"], .unavailable { opacity: .5; cursor: not-allowed; }
.size-option { position: relative; border: 1px solid #dfd6cb; border-radius: 6px; padding: 8px 7px; flex: 1; white-space: nowrap; font-size: 12px; text-align: center; cursor: pointer; }
.size-option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: inherit; }
.size-option:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.sizes { flex-wrap: wrap; }
.sizes .unavailable { text-decoration: line-through; }
.card form { margin: 0; }
/* Give product photography more of each card while keeping controls inset. */
.card .card-photo {
    aspect-ratio: 1;
    margin: -6px -6px 10px;
    background: #f5efe7;
}
.card .card-photo img,
.catalog .card .card-photo img {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
}
.quantity input { width: 38px; padding: 0; border: 0; background: transparent; text-align: center; color: inherit; appearance: textfield; -moz-appearance: textfield; }
.quantity input::-webkit-inner-spin-button, .quantity input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.empty-state { grid-column: 1 / -1; width: 100%; padding: 32px 16px; text-align: center; }
.empty-state h2 { font-size: 22px; }
.pagination { justify-content: center; gap: 20px; padding: 24px 0 0; white-space: normal; }
.pagination a { border: 1px solid var(--line); border-radius: 6px; padding: 8px 18px; }
.filter-toggle { display: flex; align-items: center; gap: 8px; padding: 0; width: 100%; text-align: inherit; }
.filters .filter-toggle span { order: -1; float: none; display: flex; align-items: center; flex-shrink: 0; line-height: 1; }
.filter-toggle svg { display: block; width: 24px; height: 24px; }
.filters input[type="radio"] { accent-color: var(--green); }
.product-description { white-space: pre-line; }
.thumbnails { max-height: 492px; overflow-y: auto; flex-shrink: 0; }
.thumbnails button { flex-shrink: 0; }
.customer-review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cash-payment { justify-content: center !important; gap: 12px; font-size: 14px !important; }
.contact-links .text-link { display: block; font-size: 13px; margin-top: 7px; padding: 0; color: #b87921; }
.contact-form-panel > p { margin-bottom: 22px; }
.contact-hero { background-color: #183a2c; }
.contact-photo, .contact-map { background-color: #efe7dd; }
.cart-product h3 { white-space: normal; overflow-wrap: anywhere; }
.cart-product > div { min-width: 0; }
.product-name, .details h1, .specs span { overflow-wrap: anywhere; }
.specs > div { gap: 12px; }
.specs span { text-align: left; }
.contact-main > *, .product-bottom > *, .shop-layout > * { min-width: 0; }

/* Keep the shop layout and both shared product collections in Arabic reading order. */
.shop-layout,
.cards,
.product-carousel,
.carousel-track {
    direction: rtl;
}
.filters h3 { direction: rtl; }
.product-carousel.swiper { overflow: hidden; scroll-behavior: auto; }
.product-carousel .swiper-wrapper { width: 100%; gap: 0; padding: 0; align-items: stretch; }
.product-carousel .swiper-slide { box-sizing: border-box; height: auto; flex-shrink: 0; }
.carousel-controls .swiper-button-lock { display: none; }
.filters legend { text-align: right; }
.price-range { --price-min: 0%; --price-max: 100%; padding-top: 6px; }
.price-range-track {
    position: relative;
    height: 28px;
    background: linear-gradient(to left,
        #d8cbbb 0 var(--price-min),
        var(--gold) var(--price-min) var(--price-max),
        #d8cbbb var(--price-max) 100%);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 4px;
}
.filters .price-range-track input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 28px;
    margin: 0;
    padding: 0;
    direction: rtl;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
}
.filters .price-range-track input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.filters .price-range-track input[type="range"]::-moz-range-track { height: 4px; background: transparent; }
.filters .price-range-track input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    margin-top: -7px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 1px 4px #073c2d55;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: auto;
    cursor: grab;
}
.filters .price-range-track input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 1px 4px #073c2d55;
    pointer-events: auto;
    cursor: grab;
}
.filters .price-range-track input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }
.filters .price-range-track input[type="range"]:active::-moz-range-thumb { cursor: grabbing; }
.filters .price-range-track input[type="range"]:focus-visible { outline: none; }
.filters .price-range-track input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--gold); outline-offset: 3px; }
.filters .price-range-track input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid var(--gold); outline-offset: 3px; }
.price-range .range-label { align-items: center; gap: 5px; }
.price-range .range-label output { min-width: 0; color: var(--green); font-weight: 700; }
.catalog-bar .view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}
.catalog-bar .view + .view { margin-left: 4px; }
.catalog-bar .view svg { display: block; width: 20px; height: 20px; }
.catalog-bar select,
.contact-form-grid select,
.checkout-form-grid select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px 16px;
    padding-inline: 17px 36px;
}
.carousel-controls button {
    display: grid;
    place-items: center;
    padding: 0;
    line-height: 1;
}
.carousel-controls button svg {
    display: block;
    width: 21px;
    height: 21px;
}
.hero .gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.hero .gold svg { width: 21px; height: 21px; }
@media (min-width: 1101px) and (max-width: 1470px) {
    .contact-main { margin-left: 20px; margin-right: 20px; grid-template-columns: minmax(0,446fr) minmax(0,550fr) minmax(0,400fr); height: auto; }
    .contact-visuals { grid-template-rows: 277px 236px; }
    .contact-detail { gap: 12px; }
    .contact-detail i { width: 44px; height: 44px; }
}
@media (max-width: 900px) {
    .contact header { height: auto; }
    .footer-inner { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 560px) {
    header nav { gap: 12px; }
    .tools .account-link svg { width: 26px; height: 26px; }
    .size-option { font-size: 10px; padding: 7px 3px; }
    .filters fieldset { display: block; }
    .js .filters:not(.expanded) #filter-fields,
    .js .filters:not(.expanded) > .primary,
    .js .filters:not(.expanded) > .reset { display: none; }
    .js .filters:not(.expanded) h3 { margin: 0; padding: 0; }
    .filters.expanded fieldset { display: block; }
    .filter-toggle { min-height: 28px; }
    .thumbnails { max-height: 323px; }
    .cart-actions .outline, .cart-actions button { padding-left: 8px; padding-right: 8px; }
    .purchase { gap: 12px; flex-wrap: wrap; }
    .catalog-bar select { padding-inline: 8px 28px; background-position: left 8px center; background-size: 14px 14px; }
    .cards.list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Checkout */
body.checkout-page-body { width: auto; margin: 0; padding: 0; background: #fdfbf8; font-weight: 400; }
.checkout-hero {
    position: relative;
    min-height: 122px;
    overflow: hidden;
    border-bottom: 1px solid #e9dfd3;
}
.checkout-hero-copy { padding: 25px 24px 20px; text-align: center; }
.checkout-hero-copy h1 { margin: 0 0 4px; font-size: clamp(32px, 3vw, 45px); line-height: 1.2; }
.checkout-hero-copy p { margin: 0; color: #66706b; font-size: 17px; }
.checkout-hero-note { position: absolute; top: 25px; left: 12%; color: var(--green); font-size: 23px; font-weight: 700; line-height: 1.5; text-align: center; }
.checkout-hero-note span { display: block; width: 50px; height: 3px; margin: 7px auto 0; border-radius: 10px; background: var(--gold); transform: rotate(-5deg); }
.checkout-page { max-width: 1400px; margin: 24px auto 18px; padding: 0 24px; }
.checkout-layout { display: grid; grid-template-columns: minmax(320px, .55fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.checkout-panel { overflow: hidden; border: 1px solid #e8dfd5; border-radius: 10px; background: #fffdfa; box-shadow: 0 2px 8px #38271308; }
.checkout-panel-heading { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 22px; border-bottom: 1px solid #eee5da; background: linear-gradient(100deg, #faf7f2, #f4eee5); }
.checkout-panel-heading h2 { margin: 0 0 3px; font-size: 21px; }
.checkout-panel-heading p { margin: 0; color: #77736d; font-size: 12px; }
.checkout-panel-heading > svg { width: 34px; height: 34px; color: var(--green); stroke-width: 1.7; }
.checkout-summary .checkout-panel-heading > svg { color: var(--gold); }
.checkout-items { padding: 0 18px; }
.checkout-item { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 13px; align-items: center; min-height: 96px; padding: 12px 0; border-bottom: 1px solid #eee6dc; }
.checkout-item img { width: 88px; height: 76px; object-fit: cover; border-radius: 7px; }
.checkout-item > div { padding-right: 34px; min-width: 0; }
.checkout-item h3 { margin: 0 0 5px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.checkout-item small { color: #7d7d78; font-size: 12px; }
.checkout-item span { display: block; margin-top: 4px; font-size: 12px; }
.checkout-item > b { color: var(--green); font-size: 15px; white-space: nowrap; }
.checkout-totals { padding: 14px 18px 0; }
.checkout-totals > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 34px; }
.checkout-totals b { font-weight: 600; }
.checkout-free { color: #43862f; }
.checkout-totals .checkout-total { min-height: 58px; margin-top: 8px; padding: 10px 14px; border-radius: 7px; background: #f7f0e6; color: var(--green); font-size: 20px; }
.checkout-totals .checkout-total b { font-size: 25px; }
.checkout-submit { width: calc(100% - 36px); min-height: 55px; margin: 24px 18px 0; padding: 11px 18px; border-radius: 6px; background: linear-gradient(110deg, #073c2d, #00523d); color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.checkout-submit svg { width: 22px; height: 22px; }
.checkout-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 18px; color: #77736d; font-size: 12px; }
.checkout-secure svg { width: 17px; height: 17px; color: var(--gold); }
.checkout-details { min-width: 0; }
.checkout-details > * + * { margin-top: 16px; }
.checkout-form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px 18px; padding: 20px 24px; }
.checkout-form-grid label { grid-column: span 3; display: block; min-width: 0; color: #172e28; font-size: 14px; }
.checkout-form-grid label:nth-of-type(4), .checkout-form-grid label:nth-of-type(5), .checkout-form-grid label:nth-of-type(6) { grid-column: span 2; }
.checkout-form-grid .checkout-field-wide { grid-column: 1 / -1; }
.checkout-form-grid label > span:first-child { display: block; margin-bottom: 7px; }
.checkout-form-grid em { color: #b5241b; font-style: normal; }
.checkout-form-grid input,
.checkout-form-grid select,
.checkout-form-grid textarea { width: 100%; border: 1px solid #ddd7d0; border-radius: 6px; background-color: #fff; color: #26322e; outline: none; font: inherit; }
.checkout-form-grid input,
.checkout-form-grid select { height: 44px; padding: 0 13px; }
.checkout-form-grid select { padding-inline: 17px 36px; }
.checkout-form-grid textarea { min-height: 60px; padding: 12px 13px; resize: vertical; }
.checkout-form-grid input:focus,
.checkout-form-grid select:focus,
.checkout-form-grid textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px #073c2d12; }
.checkout-phone { height: 44px; display: flex !important; align-items: center; margin: 0 !important; border: 1px solid #ddd7d0; border-radius: 6px; overflow: hidden; direction: ltr; }
.checkout-phone > span { padding: 0 12px; }
.checkout-phone b { height: 100%; display: flex; align-items: center; padding: 0 12px; border-left: 1px solid #e5dfd8; border-right: 1px solid #e5dfd8; font-weight: 400; }
.checkout-phone input { height: 100%; border: 0; border-radius: 0; direction: ltr; }
.checkout-phone:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px #073c2d12; }
.checkout-phone input:focus { box-shadow: none; }
.checkout-payment .checkout-panel-heading { min-height: 68px; }
.payment-options { padding: 14px 18px 16px; }
.payment-option { min-height: 88px; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid #ded9d2; border-radius: 7px; cursor: pointer; transition: border-color .2s, background .2s; }
.payment-option:has(input:checked) { border-color: var(--green); background: #f8fbf9; box-shadow: inset 0 0 0 1px #073c2d22; }
.payment-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); }
.payment-option > svg { width: 36px; height: 36px; color: var(--green); stroke-width: 1.6; }
.payment-option b { display: block; margin-bottom: 5px; color: var(--green); font-size: 14px; }
.payment-option small { color: #73756f; font-size: 11px; line-height: 1.45; }
.payment-option-static { grid-template-columns: auto minmax(0, 1fr) auto; border-color: var(--green); background: #f8fbf9; box-shadow: inset 0 0 0 1px #073c2d22; cursor: default; }
.payment-option-static > svg:last-child { width: 21px; height: 21px; }
.checkout-back { width: max-content; display: flex; align-items: center; gap: 8px; color: #aa690d; font-size: 14px; }
.checkout-back svg { width: 19px; height: 19px; }
.checkout-errors { padding: 13px 18px; border: 1px solid #e4b7b3; border-radius: 8px; background: #fff4f3; color: #8e2720; font-size: 13px; }
.checkout-errors ul { margin: 7px 18px 0 0; padding: 0; }
@media (max-width: 1050px) {
    .checkout-layout { grid-template-columns: minmax(280px, .7fr) minmax(0, 1fr); }
    .payment-option { min-height: 72px; }
    .checkout-form-grid label:nth-of-type(4), .checkout-form-grid label:nth-of-type(5), .checkout-form-grid label:nth-of-type(6) { grid-column: span 3; }
}
@media (max-width: 760px) {
    .checkout-hero { min-height: 112px; }
    .checkout-hero-note { display: none; }
    .checkout-hero-copy { padding-top: 24px; }
    .checkout-page { margin-top: 14px; padding: 0 14px; }
    .checkout-layout { display: flex; flex-direction: column; }
    .checkout-summary { position: static; width: 100%; order: 2; }
    .checkout-details { width: 100%; order: 1; }
    .checkout-form-grid { grid-template-columns: 1fr; padding: 17px 14px; }
    .checkout-form-grid label,
    .checkout-form-grid label:nth-of-type(4),
    .checkout-form-grid label:nth-of-type(5),
    .checkout-form-grid label:nth-of-type(6),
    .checkout-form-grid .checkout-field-wide { grid-column: 1; }
    .checkout-back { margin-bottom: 4px; }
    .checkout-item > div { padding-right: 10px; }
}
@media (max-width: 430px) {
    .checkout-panel-heading { padding: 13px 15px; }
    .checkout-item { grid-template-columns: 70px minmax(0, 1fr); }
    .checkout-item img { width: 70px; height: 66px; }
    .checkout-item > b { grid-column: 2; }
}

/* Checkout success */
body.checkout-success-page { width: auto; margin: 0; padding: 0; background: #fdfbf8; font-weight: 400; }
.checkout-success-page #app { min-height: 100vh; display: flex; flex-direction: column; }
.checkout-success-page #main-content { flex: 1; }
.checkout-success-page .site-footer { margin-top: auto; }
.success-hero {
    position: relative;
    min-height: 138px;
    overflow: hidden;
    border-bottom: 1px solid #e9dfd3;
}
.success-hero-note { position: absolute; top: 31px; left: 12%; color: var(--green); font-size: 22px; font-weight: 700; line-height: 1.45; text-align: center; }
.success-hero-note span { display: block; width: 48px; height: 3px; margin: 7px auto 0; border-radius: 10px; background: var(--gold); transform: rotate(-5deg); }
.success-page { max-width: 1000px; min-height: 530px; margin: 0 auto; padding: 0 24px 50px; text-align: center; }
.success-check { position: relative; z-index: 1; width: 84px; height: 84px; display: grid; place-items: center; margin: -42px auto 14px; border: 10px solid #fdfbf8; border-radius: 50%; background: #d8efd8; color: var(--green); }
.success-check svg { width: 40px; height: 40px; stroke-width: 2.2; }
.success-copy h1 { margin: 0 0 4px; font-size: clamp(30px, 3vw, 39px); }
.success-copy p { margin: 4px 0; color: #666b67; font-size: 15px; }
.success-copy .success-thanks { margin-bottom: 9px; font-size: 18px; }
.success-order-details { display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px auto 18px; border: 1px solid #e6ddd2; border-radius: 9px; background: #fffdfa; }
.success-order-detail { position: relative; min-height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px 25px; }
.success-order-detail + .success-order-detail::after { content: ''; position: absolute; top: 31px; right: 0; width: 1px; height: 70px; background: #e0d1c0; }
.success-order-detail > svg { width: 27px; height: 27px; margin-bottom: 6px; color: var(--gold); stroke-width: 1.8; }
.success-order-detail > span { margin-bottom: 4px; font-size: 13px; }
.success-order-detail > b { color: #172e28; font-size: 15px; font-weight: 600; }
.success-order-detail > small { margin-top: 2px; color: #6e726f; font-size: 12px; }
.success-status { min-width: 126px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 15px; border-radius: 30px; background: #e1f1dc; color: #285f2c !important; }
.success-status i { width: 8px; height: 8px; border-radius: 50%; background: #3b9b3e; }
.success-shop-link { min-width: 285px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 28px; border: 1px solid #dfc7a8; border-radius: 6px; color: #a9640d; font-size: 15px; }
.success-shop-link svg { width: 20px; height: 20px; }
@media (max-width: 700px) {
    .success-hero { min-height: 116px; }
    .success-hero-note { display: none; }
    .success-page { min-height: 0; padding: 0 14px 35px; }
    .success-check { width: 74px; height: 74px; margin-top: -37px; border-width: 8px; }
    .success-check svg { width: 34px; height: 34px; }
    .success-copy p { font-size: 13px; }
    .success-order-details { grid-template-columns: 1fr; }
    .success-order-detail { min-height: 105px; }
    .success-order-detail + .success-order-detail::after { top: 0; right: 12%; width: 76%; height: 1px; }
    .success-shop-link { width: 100%; min-width: 0; }
}

/* Shared image and treatment for storefront page banners. */
.shop-banner,
.contact .contact-hero,
.checkout-hero,
.success-hero {
    background: linear-gradient(#082d2266, #082d2266),
        url('../images/storefront/page-banner.png') center / cover no-repeat;
    color: #fff;
}
.shop-banner::before { content: none; }
.shop-banner a,
.checkout-hero-copy h1,
.checkout-hero-copy p,
.checkout-hero-note,
.success-hero-note { color: #fff; }
.checkout-hero-note span,
.success-hero-note span { background: #fff; }
