@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@400;600;700;800&display=swap');

:root {
    --ink: #22201d;
    --muted: #6f6a64;
    --paper: #faf8f5;
    --line: #e8e1d8;
    --green: #173c2b;
    --orange: #c4592f
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    color: var(--ink);
    font: 14px 'Noto Kufi Arabic', Arial, sans-serif
}

button,
input {
    font: inherit
}

header {
    height: 44px;
    border-bottom: 1px solid #ddd;
    display: grid;
    grid-template-columns: 25px 45px 1fr 45px;
    align-items: center;
    padding: 0 22px;
    direction: ltr
}

header button {
    border: 0;
    background: none;
    font-size: 20px
}

.logo {
    grid-column: 3;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #30241f;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    line-height: 1
}

.logo small {
    font-size: 4px;
    letter-spacing: 3px
}

.product {
    width: min(calc(100% - 40px), 1200px);
    display: grid;
    grid-template-columns: 62% 38%;
    direction: ltr;
    margin: 10px auto
}

.gallery {
    direction: rtl;
    position: sticky;
    top: 30px;
    align-self: start
}

.stage {
    aspect-ratio: 1;
    background: var(--paper);
    position: relative;
    overflow: hidden
}

.stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .2s
}

.stage button {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 55px;
    border: 0;
    background: #fffffff0;
    font-size: 30px
}

.stage #prev {
    color: #000 !important;
    right: 8px
}

.stage #next {
    color: #000 !important;
    left: 8px
}

.thumbs {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow: auto
}

.thumbs button {
    flex: 0 0 calc((100% - 16px)/3);
    aspect-ratio: 1;
    border: 0;
    padding: 0;
    opacity: .65;
    background: var(--paper)
}

.thumbs button.active {
    opacity: 1;
    box-shadow: inset 0 0 0 2px #000
}

.thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.panel {
    direction: rtl;
    margin-left: 60px;
    padding: 18px;
    border-radius: 20px;
    box-shadow: 0 1px 3px #22201d0f, 0 12px 32px -16px #c4592f2e;
    position: sticky;
    top: 30px;
    align-self: start
}

.panel h1 {
    font-size: 27.5px;
    margin: 0
}

.underline {
    display: block;
    width: 52px;
    height: 4px;
    background: linear-gradient(90deg, var(--orange), #ffd700);
    border-radius: 3px
}

.price {
    margin-top: 10px;
    color: #9c4223;
    font-size: 19px;
    font-weight: 700;
    direction: ltr;
    text-align: right
}

.tax {
    margin: 2px 0 16px;
    color: var(--muted);
    font-size: 10px
}

.panel fieldset {
    border: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 13px
}

.panel legend {
    float: right;
    min-width: 65px;
    font-weight: 700
}

.panel fieldset div {
    display: flex;
    gap: 12px
}

.variant {
    position: relative
}

.variant input {
    position: absolute;
    opacity: 0
}

.variant label {
    height: 44px;
    min-width: 63px;
    padding: 0 12px;
    display: grid;
    place-items: center;
    background: #f5f5f5;
    cursor: pointer
}

.variant input:checked+label {
    background: #000;
    color: #fff
}

.qty {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 140px;
    height: 48px;
    border: 1px solid #111;
    direction: ltr;
    margin: 22px 0
}

.qty>* {
    -webkit-appearance: none;
    appearance: none;
    color: #000 !important;
    min-width: 0;
    border: 0;
    background: #fff;
    text-align: center
}

.offers {
    display: grid;
    gap: 9px
}

.offers label {
    position: relative;
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    gap: 8px;
    min-height: 80px;
    padding: 13px;
    border: 1.5px solid #d8d1c8;
    border-radius: 12px
}

.offers input {
    position: absolute;
    opacity: 0
}

.offers label>i {
    width: 19px;
    height: 19px;
    border: 2px solid #756d64;
    border-radius: 50%;
    box-shadow: inset 0 0 0 4px #fff
}

.offers label.active {
    border-color: var(--green);
    background: #f4f8f5;
    box-shadow: 0 0 0 1px var(--green)
}

.offers label.active>i {
    background: var(--green);
    border-color: var(--green)
}

.offers label>span {
    grid-column: 3;
    grid-row: 1/span 2;
    direction: ltr;
    display: flex;
    flex-direction: column;
    font-weight: 700
}

.offers s {
    font-size: 10px;
    color: var(--muted)
}

.offers em {
    position: absolute;
    right: 132px;
    background: var(--green);
    color: #fff;
    border-radius: 99px;
    padding: 2px 7px;
    font-size: 10px;
    font-style: normal
}

.buy {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 99px;
    background: #000;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    margin-top: 12px
}

.buy:hover {
    background: #292929
}

.trust {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 20px
}

.trust article {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    margin-bottom: 13px
}

.trust article>span {
    font-size: 20px;
    text-align: center
}

.trust p {
    font-size: 11px;
    color: var(--muted);
    margin: 2px 0
}

.payments {
    display: flex !important;
    gap: 4px !important;
    direction: ltr;
    justify-content: center
}

.payments span {
    border: 1px solid #ddd;
    padding: 2px 4px;
    font: bold 8px Arial;
    color: #173c68
}

.accordions {
    width: min(calc(100% - 30px), 1168px);
    margin: 15px auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden
}

.accordions article+article {
    border-top: 1px solid var(--line)
}

.accordions button {
    color: #000 !important;
    width: 100%;
    height: 52px;
    border: 0;
    background: #fff;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700
}

.accordions button i:before {
    content: '+';
    font-size: 20px;
    font-family: monospace !important;
    font-style: normal !important;
    ;
}

.accordions button.open i:before {
    content: '−'
}

.accordions article>div {
    padding: 0 16px 15px;
    color: var(--muted)
}

.features {
    max-width: 1168px;
    margin: 32px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px
}

.features article {
    text-align: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    font-size: 25px;
    color: var(--green)
}

.features b {
    display: block;
    color: var(--ink);
    font-size: 14px;
    margin-top: 8px
}

.description {
    max-width: 1168px;
    margin: 50px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center
}

.description h2,
.related h2 {
    font-size: 30px
}

.description small,
.related small {
    color: var(--orange);
    font-weight: 700
}

.description p {
    line-height: 2;
    color: var(--muted)
}

.description img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover
}

.related {
    max-width: 1168px;
    margin: 50px auto;
    text-align: center
}

.related>div {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: right
}

.card {
    color: inherit;
    text-decoration: none
}

.card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover
}

.card h3 {
    font-size: 13px;
    margin: 8px 0
}

.card p {
    color: #9c4223;
    font-weight: 700
}

footer {
    background: #16362a;
    color: #f4efe6;
    text-align: center;
    padding: 45px 20px
}

footer .logo {
    color: #f4efe6;
    margin: auto
}

.sticky {
    display: none
}

dialog {
    height: 100%;
    width: min(420px, 100%);
    max-height: none;
    margin: 0 0 0 auto;
    border: 0;
    padding: 30px 24px
}

dialog::backdrop {
    background: #0007
}

#cart-close {
    position: absolute;
    left: 18px;
    top: 12px;
    border: 0;
    background: none;
    font-size: 30px
}

.cart-row {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 12px 0
}

.cart-row img {
    width: 70px;
    height: 70px;
    object-fit: cover
}

.cart-row button {
    border: 0;
    background: none;
    color: #9c4223
}

.total {
    display: flex;
    justify-content: space-between
}

#toast {
    position: fixed;
    z-index: 70;
    left: 50%;
    bottom: 20px;
    transform: translate(-50%, 100px);
    background: var(--green);
    color: #fff;
    padding: 10px 18px;
    border-radius: 99px;
    transition: .2s
}

#toast.show {
    transform: translate(-50%, 0)
}

@media(max-width:749px) {
    .product {
        width: 100%;
        display: block;
        margin-top: 0
    }

    .gallery {
        position: static
    }

    .stage button {
        display: block
    }

    .thumbs {
        padding: 0 10px
    }

    .thumbs button {
        flex-basis: 70px
    }

    .panel {
        position: static;
        margin: 14px 10px;
        padding: 16px
    }

    .panel h1 {
        font-size: 24px
    }

    .accordions,
    .features,
    .description,
    .related {
        width: calc(100% - 20px)
    }

    .features {
        gap: 6px
    }

    .features article {
        padding: 14px 4px
    }

    .features b {
        font-size: 10px
    }

    .description {
        grid-template-columns: 1fr;
        gap: 20px
    }

    .description h2,
    .related h2 {
        font-size: 24px
    }

    .related>div {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px
    }

    .sticky {
        position: fixed;
        z-index: 30;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
        align-items: center;
        padding: 9px 12px;
        background: #fff;
        box-shadow: 0 -5px 18px #0002;
        transform: translateY(110%);
        transition: .2s
    }

    .sticky.visible {
        transform: none
    }

    .sticky div {
        display: flex;
        flex-direction: column
    }

    .sticky span {
        color: #9c4223;
        font-size: 11px
    }

    .sticky button {
        height: 43px;
        border: 0;
        border-radius: 99px;
        background: #000;
        color: #fff;
        padding: 0 18px
    }


}