:root {
    --brand: #2c978d;
    --brand-strong: #1f7a70;
    --brand-deep: #16524b;
    --brand-night: #0e332f;
    --brand-tint: #e7f3f1;
    --gold: #c8a15a;
    --ink: #14302d;
    --muted: #5c6f6b;
    --line: #dbe6e3;
    --bg: #f8faf9;
    --white: #ffffff;
    --danger: #b4382c;
    --wa: #1e9d4e;
    --radius: 10px;
    --shadow: 0 12px 32px rgba(14, 51, 47, .12);
}

*,
*::before,
*::after {
    box-sizing: border-box
}

* {
    margin: 0;
    padding: 0
}

[hidden] {
    display: none !important
}

html {
    scroll-behavior: smooth
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased
}

img {
    display: block;
    max-width: 100%
}

a {
    color: inherit;
    text-decoration: none
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit
}

button {
    cursor: pointer;
    background: none;
    border: 0
}

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px
}

.container {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 20px
}

.view {
    padding-bottom: 72px
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    margin: 36px 0 24px
}

.section-title {
    font-size: 19px;
    font-weight: 700;
    margin: 6px 0 14px
}

.topbar {
    background: var(--brand-night);
    color: #cfe5e1;
    font-size: 14px;
    text-align: center;
    padding: 7px 0
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line)
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 72px
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px
}

.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain
}

.brand-name {
    font-size: 27px;
    font-weight: 800;
    color: var(--brand-deep)
}

.search {
    flex: 1;
    max-width: 460px;
    margin-inline: auto
}

.search input {
    width: 100%;
    padding: 10px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    outline: none;
    transition: border-color .15s, box-shadow .15s
}

.search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint)
}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    border-radius: var(--radius);
    background: var(--brand-strong);
    color: var(--white);
    font-weight: 700;
    transition: background .15s
}

.cart-btn:hover {
    background: var(--brand-deep)
}

.cart-count {
    min-width: 24px;
    height: 24px;
    padding-inline: 6px;
    border-radius: 12px;
    background: var(--gold);
    color: var(--brand-night);
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800
}

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    padding: 100px 0 112px;
    border-bottom: 4px solid var(--gold);
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 24px), linear-gradient(135deg, var(--brand-deep), var(--brand-night)) center/cover no-repeat
}

.hero::before {
    content: "";
    position: absolute;
    inset-block: 6%;
    inset-inline-end: 2%;
    width: min(40%, 420px);
    background: url("../assets/logo.png") center/contain no-repeat;
    opacity: .2
}

.hero.has-image::before {
    display: none
}

.hero.has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(270deg, rgba(14, 51, 47, .88), rgba(14, 51, 47, .3))
}

.hero .container {
    position: relative;
    z-index: 1
}

.hero h1 {
    font-size: clamp(34px, 6.4vw, 64px);
    line-height: 1.15;
    font-weight: 800;
    max-width: 13ch
}

.hero p {
    margin-top: 16px;
    max-width: 44ch;
    font-size: 20px;
    color: #cfe5e1
}

.hero-cta {
    display: inline-flex;
    margin-top: 32px;
    padding: 14px 38px;
    border-radius: var(--radius);
    background: var(--gold);
    color: var(--brand-night);
    font-weight: 800;
    font-size: 17px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
    transition: transform .15s, background .15s
}

.hero-cta:hover {
    background: #d6b36f;
    transform: translateY(-2px)
}

.features {
    position: relative;
    z-index: 2;
    margin-top: -38px
}

.features-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 22px 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow)
}

.feature {
    display: flex;
    align-items: center;
    gap: 14px
}

.feature-icon {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--brand-tint);
    color: var(--brand-strong);
    display: grid;
    place-items: center
}

.feature strong {
    display: block;
    font-weight: 700;
    line-height: 1.4
}

.feature span {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5
}

.section-head {
    margin: 56px 0 22px
}

.section-head h2 {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.3
}

.section-head h2::after {
    content: "";
    display: block;
    width: 52px;
    height: 4px;
    margin-top: 8px;
    border-radius: 2px;
    background: var(--gold)
}

.section-head p {
    margin-top: 8px;
    color: var(--muted)
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 24px
}

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 4px;
    scrollbar-width: none
}

.chips::-webkit-scrollbar {
    display: none
}

.chip {
    flex: none;
    padding: 8px 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    font-weight: 500;
    transition: all .15s
}

.chip:hover {
    border-color: var(--brand)
}

.chip.is-active {
    background: var(--brand-strong);
    border-color: var(--brand-strong);
    color: var(--white)
}

.toolbar-end {
    display: flex;
    align-items: center;
    gap: 14px
}

.result-count {
    color: var(--muted);
    font-size: 15px
}

#sortSelect {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white)
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px
}

.product-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    animation: rise .5s both
}

.product-card:nth-child(2) {
    animation-delay: .06s
}

.product-card:nth-child(3) {
    animation-delay: .12s
}

.product-card:nth-child(4) {
    animation-delay: .18s
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow)
}

.product-media {
    position: relative;
    aspect-ratio: 4/5;
    background: var(--brand-tint);
    overflow: hidden
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s
}

.product-card:hover .product-media img {
    transform: scale(1.06)
}

.product-media::after {
    content: "عرض المنتج";
    position: absolute;
    inset-inline: 14px;
    bottom: 14px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(14, 51, 47, .9);
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: all .2s
}

.product-card:hover .product-media::after {
    opacity: 1;
    transform: none
}

.badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    z-index: 1;
    padding: 2px 14px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--brand-night);
    font-size: 13px;
    font-weight: 800
}

.product-info {
    padding: 14px 16px 16px
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5
}

.product-price {
    margin-top: 4px;
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-strong)
}

.old-price {
    margin-inline-start: 8px;
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
    text-decoration: line-through
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.empty-state {
    padding: 70px 0;
    text-align: center
}

.empty-title {
    font-size: 22px;
    font-weight: 700
}

.empty-text {
    margin: 6px 0 20px;
    color: var(--muted)
}

.steps {
    margin-top: 24px
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px
}

.step {
    padding: 26px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px
}

.step-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--brand-strong);
    color: var(--white);
    font-weight: 800
}

.step h3 {
    font-size: 18px;
    margin-bottom: 4px
}

.step p {
    color: var(--muted);
    font-size: 15px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 700;
    text-align: center;
    transition: background .15s, color .15s
}

.btn-primary {
    background: var(--brand-strong);
    color: var(--white)
}

.btn-primary:hover {
    background: var(--brand-deep)
}

.btn-outline {
    border-color: var(--ink);
    color: var(--ink)
}

.btn-outline:hover {
    background: var(--brand-tint)
}

.btn-wa {
    background: var(--wa);
    color: var(--white)
}

.btn-wa:hover {
    background: #17803f
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed
}

.breadcrumb {
    display: flex;
    gap: 8px;
    margin: 28px 0 20px;
    font-size: 15px;
    color: var(--muted)
}

.breadcrumb a:hover {
    color: var(--brand-strong)
}

.detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start
}

.gallery-main {
    aspect-ratio: 4/5;
    background: var(--brand-tint);
    border-radius: 14px;
    overflow: hidden
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px
}

.thumb {
    width: 74px;
    height: 74px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: var(--brand-tint)
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.thumb.is-active {
    border-color: var(--brand-strong)
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.detail-cat {
    color: var(--muted);
    font-size: 15px
}

.detail-name {
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.3;
    font-weight: 800
}

.detail-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--brand-strong)
}

.detail-desc {
    color: var(--muted);
    max-width: 56ch;
    white-space: pre-line
}

.option-label {
    font-weight: 700;
    margin-bottom: 8px
}

.option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.option {
    min-width: 50px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    font-weight: 500
}

.option:hover {
    border-color: var(--ink)
}

.option.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white)
}

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white)
}

.qty button {
    width: 38px;
    height: 38px;
    font-size: 20px
}

.qty button:hover {
    background: var(--brand-tint)
}

.qty span {
    min-width: 34px;
    text-align: center;
    font-weight: 700
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px
}

.detail-actions .btn {
    flex: 1;
    min-width: 160px;
    padding-block: 14px
}

.field-note {
    min-height: 22px;
    font-size: 14px;
    color: var(--danger)
}

.cart-layout {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 34px;
    align-items: start
}

.cart-item {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    align-items: center
}

.cart-item:first-child {
    border-top: 1px solid var(--line)
}

.cart-item-img {
    width: 92px;
    height: 112px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--brand-tint)
}

.cart-item-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4
}

.cart-item-meta {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px
}

.cart-item-side {
    text-align: end
}

.cart-item-price {
    font-weight: 800
}

.link-remove {
    margin-top: 8px;
    font-size: 14px;
    color: var(--danger)
}

.link-remove:hover {
    text-decoration: underline
}

.cart-summary,
.order-summary {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0
}

.summary-total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 19px;
    font-weight: 800
}

.cart-summary .btn,
.order-summary .btn {
    width: 100%;
    margin-top: 12px
}

.summary-hint {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted)
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 34px;
    align-items: start
}

.checkout-form {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white)
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px
}

.field label {
    font-weight: 500;
    font-size: 15px
}

.field input,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #b9c9c5;
    border-radius: 8px;
    background: var(--white);
    outline: none;
    transition: border-color .15s;
    resize: vertical
}

.field input:focus,
.field textarea:focus {
    border-color: var(--brand-strong);
    box-shadow: 0 0 0 3px var(--brand-tint)
}

.field.has-error input,
.field.has-error textarea {
    border-color: var(--danger)
}

.field-error {
    font-size: 14px;
    color: var(--danger)
}

.pay-options {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.pay-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer
}

.pay-option:has(input:checked) {
    border-color: var(--brand-strong);
    background: var(--brand-tint)
}

.pay-option input {
    accent-color: var(--brand-strong);
    width: 18px;
    height: 18px
}

.pay-note {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
    white-space: pre-line
}

.mini-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px
}

.mini-item small {
    display: block;
    color: var(--muted)
}

#checkoutTotals {
    margin-top: 10px
}

.site-footer {
    background: var(--brand-night);
    color: #cfe5e1;
    padding-top: 48px;
    border-top: 4px solid var(--gold)
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px
}

.footer-brand .brand {
    margin-bottom: 12px
}

.footer-brand .brand-name {
    color: var(--white)
}

.footer-brand p {
    max-width: 38ch
}

.footer-heading {
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px
}

.footer-links a,
.footer-contact a {
    display: block;
    padding: 3px 0
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--white);
    text-decoration: underline
}

.footer-bottom {
    padding-block: 18px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: 14px;
    color: #8fb3ad
}

.wa-float {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 25;
    padding: 11px 22px;
    border-radius: 999px;
    background: var(--wa);
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(14, 51, 47, .35);
    transition: transform .15s
}

.wa-float:hover {
    transform: translateY(-2px)
}

.toast {
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    max-width: calc(100% - 40px);
    padding: 12px 24px;
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--white);
    font-size: 15px;
    text-align: center
}

@media (hover:none) {
    .product-media::after {
        display: none
    }
}

@media (max-width:980px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .detail {
        gap: 28px
    }
}

@media (max-width:760px) {
    .topbar {
        font-size: 13px
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding-block: 10px
    }

    .search {
        order: 3;
        flex: 1 0 100%;
        max-width: none
    }

    .cart-btn {
        margin-inline-start: auto
    }

    .hero {
        padding: 64px 0 84px
    }

    .hero::before {
        width: 76%;
        opacity: .12
    }

    .hero p {
        font-size: 18px
    }

    .features-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px
    }

    .section-head {
        margin-top: 40px
    }

    .section-head h2 {
        font-size: 25px
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px
    }

    .product-info {
        padding: 12px
    }

    .product-price {
        font-size: 16px
    }

    .steps-grid {
        grid-template-columns: 1fr
    }

    .detail,
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr
    }

    .cart-summary,
    .order-summary {
        position: static
    }

    .cart-item {
        grid-template-columns: 72px 1fr auto;
        gap: 12px
    }

    .cart-item-img {
        width: 72px;
        height: 90px
    }

    .page-title {
        font-size: 26px;
        margin-top: 26px
    }

    .footer-inner {
        grid-template-columns: 1fr
    }

    .wa-float {
        bottom: 14px;
        left: 14px
    }
}

@media (prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important
    }
}

.hero::before {
    display: none
}

.hero {
    background: linear-gradient(270deg, rgba(14, 51, 47, .9) 0%, rgba(14, 51, 47, .45) 100%), url("../assets/hero.jpg") center/cover no-repeat var(--brand-night)
}

.season-chips {
    margin-bottom: 14px
}

.season-chips .chip {
    padding: 10px 26px;
    font-weight: 700
}

.season-wrap {
    margin-top: 30px
}

.season-chips {
    justify-content: center;
    margin-bottom: 0
}