:root {
    --red: #d5090d;
    --dark: #202124;
    --silver: #c5c7c9
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: Tahoma,Arial,sans-serif;
    color: #1b1c1f;
    background: #f5f6f8
}

a {
    text-decoration: none;
    color: inherit
}

.container {
    max-width: 1280px;
    margin: auto;
    padding-inline: 22px
}

.announcement {
    background: var(--red);
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: bold
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid #eee
}

.main-head {
    height: 82px;
    display: flex;
    align-items: center;
    gap: 28px
}

.logo {
    width: 130px;
    height: 65px;
    object-fit: contain
}

.primary {
    display: flex;
    gap: 25px;
    font-size: 14px;
    font-weight: bold
}

.search {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    background: #f0f1f3;
    border-radius: 30px;
    padding: 12px 17px;
    width: 330px
}

    .search input {
        border: 0;
        outline: 0;
        background: transparent;
        width: 100%
    }

.cart-open {
    position: relative;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--dark);
    color: #fff;
    font-size: 19px
}

    .cart-open i {
        position: absolute;
        left: -4px;
        top: -5px;
        background: var(--red);
        border-radius: 50%;
        font-style: normal;
        font-size: 10px;
        min-width: 20px;
        height: 20px;
        display: grid;
        place-items: center
    }

.category-menu {
    display: flex;
    gap: 28px;
    overflow: auto;
    border-top: 1px solid #eee;
    padding-block: 13px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap
}

    .category-menu a:first-child, .category-menu a:hover {
        color: var(--red)
    }

.mobile-menu {
    display: none
}

.hero {
    padding: 30px 16px;
    background: linear-gradient(135deg,#eee,#bfc1c3)
}

.slider3d {
    position: relative;
    perspective: 1400px
}

.slide {
    min-height: 430px;
    display: none;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 55px;
    border-radius: 35px;
    color: #fff;
    background: linear-gradient(120deg,#151515,#444,var(--red));
    box-shadow: 0 24px 55px #0005,inset 0 0 0 10px #ffffff0e;
    transform: rotateX(1deg) rotateY(-1.3deg);
    overflow: hidden
}

    .slide.active {
        display: grid;
        animation: slide .6s
    }

.slide-copy {
    position: relative;
    z-index: 2
}

    .slide-copy > span {
        display: inline-block;
        border: 1px solid #ffffff50;
        background: #ffffff14;
        border-radius: 30px;
        padding: 8px 15px
    }

.slide h1 {
    font-size: 56px;
    line-height: 1.15;
    margin: 22px 0 15px
}

.slide p {
    font-size: 18px;
    color: #ffffffcc
}

.slide a {
    display: inline-block;
    margin-top: 18px;
    padding: 15px 27px;
    background: #fff;
    color: #222;
    border-radius: 12px;
    font-weight: bold
}

.slide-art {
    text-align: center;
    font-size: 170px;
    filter: drop-shadow(0 25px 20px #0005)
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border: 0;
    border-radius: 50%;
    background: #fffffff0;
    font-size: 28px
}

.prev {
    right: 32px
}

.next {
    left: 32px
}

.dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 17px
}

    .dots button {
        width: 8px;
        height: 8px;
        padding: 0;
        border: 0;
        border-radius: 20px;
        background: #777
    }

        .dots button.active {
            width: 30px;
            background: var(--red)
        }

.categories {
    padding-block: 65px
}

.section-title, .products-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 28px
}

    .section-title small {
        color: var(--red);
        font-weight: bold
    }

    .section-title h2, .products-title h2 {
        font-size: 30px;
        margin: 8px 0 0
    }

.category-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px
}

    .category-grid a {
        background: #fff;
        border: 1px solid #e7e7e7;
        border-radius: 24px;
        padding: 24px;
        transition: .25s
    }

        .category-grid a:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px #0001
        }

    .category-grid span {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        background: #f5e7e7;
        display: grid;
        place-items: center;
        font-size: 29px
    }

    .category-grid h3 {
        margin: 25px 0 6px
    }

    .category-grid small {
        color: #888
    }

.products {
    background: #fff;
    padding-block: 58px
}

.products-title {
    border-bottom: 1px solid #ddd
}

    .products-title > div {
        display: flex;
        align-items: center;
        gap: 25px
    }

    .products-title h2 {
        border-bottom: 3px solid var(--red);
        padding-bottom: 14px
    }

    .products-title span, .products-title small {
        color: #999
    }

.product-grid {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 14px
}

.product-card {
    border: 1px solid #dedede;
    border-radius: 13px;
    overflow: hidden;
    text-align: center;
    background: #fff;
    transition: .25s
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 16px 32px #0001
    }

.product-image {
    display: grid;
    place-items: center;
    position: relative;
    aspect-ratio: 1.12;
    background: linear-gradient(145deg,#f7f7f7,#e8e9eb)
}

    .product-image i {
        position: absolute;
        right: 9px;
        top: 9px;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: var(--red);
        color: #fff;
        display: grid;
        place-items: center;
        font-size: 11px;
        font-style: normal;
        font-weight: bold
    }

    .product-image span {
        font-size: 70px
    }

.product-body {
    padding: 13px
}

    .product-body > small {
        font-size: 10px;
        color: #999
    }

    .product-body h3 {
        font-size: 14px;
        line-height: 1.45;
        min-height: 40px;
        margin: 7px 0
    }

    .product-body p {
        font-size: 10px;
        color: #777;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

.price b {
    color: var(--red);
    font-size: 14px
}

.price del {
    color: #aaa;
    font-size: 10px;
    margin-right: 5px
}

.add {
    width: 100%;
    margin-top: 13px;
    padding: 11px;
    border: 0;
    border-radius: 6px;
    background: var(--dark);
    color: #fff;
    font-weight: bold
}

    .add:hover {
        background: var(--red)
    }

.benefits {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 15px;
    padding-block: 60px
}

    .benefits article {
        display: flex;
        gap: 15px;
        background: var(--dark);
        color: #fff;
        padding: 22px;
        border-radius: 22px
    }

    .benefits b {
        color: var(--red);
        font-size: 25px
    }

    .benefits h3 {
        font-size: 15px;
        margin: 0 0 5px
    }

    .benefits p {
        font-size: 12px;
        color: #aaa;
        margin: 0
    }

footer {
    background: linear-gradient(135deg,#151515,#333);
    color: #fff
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-block: 50px
}

.footer-logo {
    width: 160px;
    height: 82px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px
}

.footer-grid p {
    line-height: 1.8;
    color: #ccc;
    font-size: 13px
}

.footer-grid a {
    display: block;
    margin: 14px 0;
    font-size: 13px
}

.social {
    display: flex;
    gap: 10px
}

    .social a {
        display: grid;
        place-items: center;
        width: 43px;
        height: 43px;
        background: var(--red);
        border-radius: 9px
    }

.copyright {
    text-align: center;
    border-top: 1px solid #ffffff20;
    padding: 18px;
    color: #aaa;
    font-size: 12px
}

.cart-panel {
    position: fixed;
    left: 0;
    top: 0;
    width: 430px;
    max-width: 95%;
    height: 100%;
    z-index: 101;
    background: #fff;
    border-right: 4px solid var(--red);
    padding: 25px;
    transform: translateX(-105%);
    transition: .3s
}

    .cart-panel.open {
        transform: none
    }

.cart-close {
    position: absolute;
    left: 20px;
    top: 17px;
    border: 0;
    background: transparent;
    font-size: 30px
}

.cart-title {
    display: flex;
    gap: 13px;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 18px
}

    .cart-title > span {
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        background: var(--red);
        border-radius: 16px
    }

    .cart-title h2 {
        margin: 0
    }

    .cart-title small {
        color: #888
    }

.cart-items {
    padding-block: 18px;
    max-height: calc(100vh - 310px);
    overflow: auto
}

    .cart-items article {
        display: flex;
        align-items: center;
        gap: 11px;
        border: 1px solid #ddd;
        border-radius: 15px;
        padding: 10px;
        margin-bottom: 10px
    }

.cart-art {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    background: #eee;
    border-radius: 12px;
    font-size: 28px
}

.cart-items article > div:nth-child(2) {
    flex: 1
}

.cart-items article small {
    display: block;
    color: var(--red);
    margin-top: 5px
}

.qty {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 20px;
    overflow: hidden
}

    .qty button {
        border: 0;
        background: #f5f5f5;
        padding: 8px
    }

    .qty b {
        min-width: 25px;
        text-align: center
    }

.empty {
    display: grid;
    gap: 8px;
    text-align: center;
    padding: 50px;
    color: #888
}

    .empty:first-letter {
        font-size: 42px
    }

.cart-summary {
    position: absolute;
    bottom: 20px;
    left: 22px;
    right: 22px;
    background: #f5f5f5;
    border-radius: 17px;
    padding: 16px
}

    .cart-summary > div {
        display: flex;
        justify-content: space-between;
        padding: 7px
    }

    .cart-summary .save {
        color: var(--red);
        font-weight: bold
    }

    .cart-summary .final {
        font-size: 18px;
        border-top: 1px solid #ddd;
        margin-top: 6px;
        padding-top: 13px
    }

    .cart-summary a {
        display: block;
        text-align: center;
        margin-top: 10px;
        background: #20b858;
        color: #fff;
        padding: 14px;
        border-radius: 14px;
        font-weight: bold
    }

.overlay {
    position: fixed;
    inset: 0;
    background: #0007;
    z-index: 100;
    display: none
}

    .overlay.open {
        display: block
    }

.admin {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 25px;
    padding-block: 40px
}

    .admin aside {
        background: var(--dark);
        color: #fff;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 16px
    }

    .admin section, .form form {
        background: #fff;
        padding: 25px
    }

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

    .bar a, .form button, .login-box button {
        background: var(--red);
        color: #fff;
        padding: 12px 20px;
        border: 0
    }

table {
    width: 100%;
    border-collapse: collapse
}

td, th {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: right
}

.form {
    padding-block: 50px
}

    .form form {
        max-width: 800px
    }

    .form label, .login-box label {
        display: block;
        margin: 12px 0
    }

    .form input, .form textarea, .form select, .login-box input {
        width: 100%;
        padding: 12px;
        border: 1px solid #ccc
    }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg,#eee,#aaa)
}

.login-box {
    width: 400px;
    max-width: 92%;
    background: #fff;
    padding: 35px;
    border-radius: 25px;
    box-shadow: 0 25px 60px #0003;
    border-top: 5px solid var(--red)
}

    .login-box img {
        width: 170px;
        display: block;
        margin: auto
    }

    .login-box button {
        width: 100%;
        margin-top: 12px
    }

.error {
    background: #fee;
    color: #b00;
    padding: 10px
}

@keyframes slide {
    from {
        opacity: .3;
        transform: rotateX(5deg) rotateY(-7deg) scale(.97)
    }

    to {
        opacity: 1;
        transform: rotateX(1deg) rotateY(-1.3deg)
    }
}

@media(max-width:900px) {
    .primary, .search {
        display: none
    }

    .mobile-menu {
        display: block;
        border: 0;
        background: none;
        font-size: 22px
    }

    .main-head {
        height: 72px
    }

    .logo {
        width: 110px
    }

    .cart-open {
        margin-right: auto
    }

    .slide {
        grid-template-columns: 1fr;
        min-height: 520px;
        padding: 30px;
        transform: none
    }

        .slide h1 {
            font-size: 38px
        }

    .slide-art {
        font-size: 110px
    }

    .category-grid {
        grid-template-columns: repeat(2,1fr)
    }

    .product-grid {
        grid-template-columns: repeat(2,1fr)
    }

    .benefits, .footer-grid, .admin {
        grid-template-columns: 1fr
    }

    .category-menu {
        gap: 20px
    }

    .products-title span {
        display: none
    }
}

@media(max-width:480px) {
    .product-grid {
        gap: 8px
    }

    .product-body {
        padding: 9px
    }

    .product-image span {
        font-size: 52px
    }

    .container {
        padding-inline: 12px
    }
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.category-grid img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 18px
}

.slide-art {
    height: 100%;
    overflow: hidden
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.category-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 18px
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

/* Large real-image presentation */
.category-grid a {
    padding: 0;
    overflow: hidden;
    position: relative;
    min-height: 310px;
    display: flex;
    flex-direction: column;
    background: #fff
}

.category-grid .category-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 0;
    display: block;
    transition: transform .45s ease,filter .45s ease
}

.category-grid a:hover .category-image {
    transform: scale(1.06);
    filter: saturate(1.08)
}

.category-grid a > span {
    margin: 22px 22px 0
}

.category-grid h3 {
    font-size: 18px;
    margin: 20px 22px 6px;
    line-height: 1.5
}

.category-grid small {
    margin: 0 22px 22px;
    color: #777
}

.product-image {
    aspect-ratio: 1/1;
    overflow: hidden
}

    .product-image img {
        transition: transform .45s ease;
        object-fit: contain;
        padding: 10px;
        background: #fff
    }

.product-card:hover .product-image img {
    transform: scale(1.07)
}

.slide-art {
    min-height: 320px;
    border-radius: 24px;
    box-shadow: 0 18px 40px #0005;
    background: #fff
}

.slider-image {
    min-height: 320px;
    object-fit: cover;
    transition: transform 6s ease
}

.slide.active .slider-image {
    transform: scale(1.04)
}

@media(max-width:900px) {
    .category-grid a {
        min-height: 260px
    }

    .category-grid .category-image {
        height: 170px
    }

    .slide-art, .slider-image {
        min-height: 250px
    }

    .slide-art {
        margin-top: 24px
    }

    .category-grid h3 {
        font-size: 16px;
        margin: 15px 15px 5px
    }

    .category-grid small {
        margin: 0 15px 16px
    }
}

@media(max-width:480px) {
    .category-grid {
        gap: 10px
    }

        .category-grid a {
            min-height: 220px;
            border-radius: 18px
        }

        .category-grid .category-image {
            height: 135px
        }

        .category-grid h3 {
            font-size: 14px
        }

        .category-grid small {
            font-size: 11px
        }

    .slide-art, .slider-image {
        min-height: 210px
    }
}

/* Local Font Awesome contact icons */
.announcement {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 28px
}

    .announcement a {
        color: #fff
    }

    .announcement i {
        margin-left: 6px;
        color: #fff
    }

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px
}

.footer-contact i {
    width: 18px;
    text-align: center;
    color: var(--red);
    font-size: 17px
}

.footer-contact a:hover {
    color: var(--red)
}

@media(max-width:600px) {
    .announcement {
        gap: 5px 14px;
        font-size: 11px;
        padding-inline: 10px
    }
}

/* Almarai Arabic font - local files */
@font-face {
    font-family: 'Almarai';
    src: url('../fonts/almarai/Almarai-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: 'Almarai';
    src: url('../fonts/almarai/Almarai-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: 'Almarai';
    src: url('../fonts/almarai/Almarai-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap
}

body, button, input, textarea, select {
    font-family: 'Almarai',Tahoma,Arial,sans-serif
}


.product-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.check-option {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 15px;
    margin: 0 !important;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 10px;
    cursor: pointer;
}

    .check-option input {
        width: 20px !important;
        height: 20px;
        margin: 0;
        accent-color: #d5090d;
    }

@media (max-width: 600px) {
    .product-options {
        grid-template-columns: 1fr;
    }
}

/* صفحة تفاصيل المنتج */
.wrap {
    width: 100%;
    max-width: 1280px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 22px;
    padding-left: 22px;
}

.detail {
    padding-top: 45px;
    padding-bottom: 60px;
    background: #f5f6f8;
}

    /* زر إضافة للسلة داخل المنتج */
    .detail .add {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: auto;
        min-width: 260px;
        margin-top: 25px;
        padding: 15px 30px;
        border: 0;
        border-radius: 12px;
        background: #d5090d;
        color: #fff;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 10px 25px rgba(213, 9, 13, 0.22);
    }

        .detail .add:hover {
            background: #202124;
            transform: translateY(-2px);
        }

    /* الفاصل بين تفاصيل المنتج والفوتر */
    .detail + footer {
        position: relative;
        margin-top: 35px;
        border-top: 6px solid #e4e6e9;
    }

        .detail + footer::before {
            content: "";
            position: absolute;
            top: -6px;
            right: 50%;
            width: 120px;
            height: 6px;
            background: #d5090d;
            transform: translateX(50%);
            border-radius: 10px 10px 0 0;
        }

@media (max-width: 600px) {
    .detail {
        padding-top: 25px;
        padding-bottom: 40px;
    }

        .detail .add {
            width: 100%;
            min-width: 0;
        }

        .detail + footer {
            margin-top: 25px;
        }
}

.cart-open > i {
    font-size: 18px;
}

.cart-open #cartCount {
    position: absolute;
    left: -4px;
    top: -5px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.cart-title > span i {
    color: #fff;
    font-size: 19px;
}

.cart-close i {
    font-size: 22px;
}

.cart-art i {
    color: #202124;
    font-size: 25px;
}

.empty > i {
    color: #d5090d;
    font-size: 45px;
    margin-bottom: 10px;
}

#waOrder {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
}

    #waOrder i {
        font-size: 20px;
    }

.qty button i {
    font-size: 10px;
    pointer-events: none;
}

/* Font Awesome cart button at the far left of the header */
.main-head .cart-open{flex:0 0 48px;display:flex;align-items:center;justify-content:center;margin-right:0;cursor:pointer;transition:.2s;box-shadow:0 8px 20px rgba(32,33,36,.16)}
.main-head .cart-open:hover{background:var(--red);transform:translateY(-2px)}
.main-head .cart-open>i{position:static;inset:auto;width:auto;height:auto;min-width:0;background:none;border-radius:0;color:#fff;font-size:18px;display:inline-block}
.main-head .cart-open #cartCount{position:absolute;left:-5px;top:-6px;min-width:21px;height:21px;padding:0 5px;display:grid;place-items:center;background:var(--red);color:#fff;border:2px solid #fff;border-radius:20px;font-size:9px;font-weight:800}
.search>i{color:#30343a;font-size:13px}.cart-close{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;cursor:pointer;transition:.2s}.cart-close:hover{background:#fff0f0;color:var(--red)}
.cart-title>span{color:#fff}.cart-title>span i{font-size:20px}.cart-items article{display:grid;grid-template-columns:62px minmax(0,1fr) auto;gap:12px;align-items:center}.cart-product-info{min-width:0}.cart-product-info b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cart-art{background:#f1f2f4;color:var(--dark)}
.qty button{width:30px;height:32px;display:grid;place-items:center;padding:0;cursor:pointer;color:#333}.qty button:hover{background:#e8e9eb;color:var(--red)}.empty{place-items:center}.empty>i{font-size:44px;color:#d5090d}#waOrder i{font-size:21px}
@media(max-width:900px){.main-head .cart-open{margin-right:auto}.cart-panel{width:410px}.cart-items article{grid-template-columns:54px minmax(0,1fr) auto}.cart-art{width:54px;height:54px}}
@media(max-width:480px){.main-head .cart-open{flex-basis:44px;width:44px;height:44px}.cart-panel{max-width:100%;width:100%;padding:20px}.cart-items article{grid-template-columns:50px minmax(0,1fr);position:relative;padding-bottom:48px}.cart-art{width:50px;height:50px}.qty{position:absolute;left:10px;bottom:9px}.cart-summary{left:16px;right:16px}}
#waOrder.disabled{opacity:.55;pointer-events:none}
