﻿@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');

:root {
    --header-height: 64px;
    --brand-gap: 12px;
    --logo-size: 48px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Almarai', "Segoe UI", Tahoma, Arial, sans-serif;
    background: #f7f7f7;
}

/* header / brand (kept from previous) */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 16px;
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
}

/* Discount badge styles (shared) */
.img-wrap {
    position: relative;
    display: block;
}

.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc3545;
    color: #fff;
    padding: 4px 8px;
    font-size: .85rem;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    z-index: 10;
}

/* Elements that belong to the boutique layout (theme 2 / 4-7 / 8-22).
   Hidden by default; each theme opts in inside its own CSS file. */
.theme2-only {
    display: none;
}

/* Clickable section titles on the home page (featured / offers / new) */
.section-head-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.section-head-link > a {
    color: inherit;
    text-decoration: none;
}

.section-head-link > a:hover {
    opacity: .82;
}

.section-head-link .section-all {
    font-size: .78rem;
    font-weight: 700;
    opacity: .7;
    white-space: nowrap;
}

.section-head-link .section-all:hover {
    opacity: 1;
}

/* ---------- Main menu: categories dropdown ---------- */
.nav-drop {
    position: relative;
}

.nav-drop > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    display: inline-block;
    transition: transform .18s ease;
}

.nav-drop:hover > a .nav-caret,
.nav-drop:focus-within > a .nav-caret {
    transform: rotate(180deg);
}

.nav-sub {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
    display: none;
    z-index: 95;
}

.nav-drop:hover > .nav-sub,
.nav-drop:focus-within > .nav-sub {
    display: block;
}

.nav-sub li {
    margin: 0;
    padding: 0;
}

.site-header .nav-list .nav-sub a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #1c1c1c !important;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.site-header .nav-list .nav-sub a:hover,
.site-header .nav-list .nav-sub a:focus {
    background: #f2f2f2 !important;
    color: #000000 !important;
}

@media (max-width: 700px) {
    .nav-sub {
        position: static;
        display: block;
        min-width: 0;
        max-height: none;
        overflow: visible;
        margin: 0;
        padding: 0 0 6px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .site-header .nav-list .nav-sub a {
        padding: 10px 26px;
        color: #1c1c1c !important;
        font-weight: 600;
        white-space: normal;
    }

    .nav-caret {
        display: none;
    }

    /* the collapsed mobile panel is white, so dark themes need dark links */
    body.theme-modern .site-header .main-nav a,
    body.theme-shopify .site-header .main-nav a {
        color: #1c1c1c !important;
    }

    body.theme-modern .site-header .main-nav a:hover,
    body.theme-shopify .site-header .main-nav a:hover {
        background: #f2f2f2 !important;
        color: #000000 !important;
    }
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.original-price s {
    color: #6c757d;
    opacity: .9;
}

/* rest of styles retained */
.brand {
    display: flex;
    align-items: center;
    gap: var(--brand-gap);
}

.brand-logo {
    width: var(--logo-size);
    height: var(--logo-size);
    object-fit: contain;
}

.store-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #111;
}

/* Nav */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    cursor: pointer;
}

.main-nav .nav-list {
    display: flex;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    padding: 8px 10px;
    border-radius: 6px;
}

    .main-nav a:hover {
        background: #f3f3f3
    }

/* Mobile */
@media (max-width:700px) {
    .store-name {
        font-size: 0.95rem;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: var(--header-height);
        right: 0;
        left: 0;
        background: #fff;
        border-top: 1px solid #e6e6e6;
        transform: scaleY(0);
        transform-origin: top;
        transition: transform .18s ease;
        z-index: 40;
        overflow: hidden;
    }

        .main-nav .nav-list {
            flex-direction: column;
            gap: 0;
        }

            .main-nav .nav-list li a {
                display: block;
                padding: 12px 16px;
                border-bottom: 1px solid #f0f0f0;
            }

        .main-nav.open {
            transform: scaleY(1)
        }
}
