:root {
            --ink: #17140f;
            --paper: #ffffff;
            --paper-dim: #f7f5f2;
            --line: #e7e2d9;
            --gold: #b8935a;
            --gold-deep: #97753f;
            --text-soft: #6b6459;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--paper);
            color: var(--ink);
            line-height: 1.6;
        }

        h1, h2, h3, .brand {
            font-family: 'Playfair Display', serif;
        }

        a {
            color: inherit;
        }

        img {
            max-width: 100%;
            display: block;
        }

        /* شريط علوي */
        .announce {
            background: var(--ink);
            color: var(--paper);
            text-align: center;
            font-size: 13px;
            padding: 10px 20px;
            letter-spacing: 0.3px;
        }

        /* الهيدر */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 22px 8%;
            border-bottom: 1px solid var(--line);
            background: var(--paper);
        }

        .brand {
            font-size: 25px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .brand span {
            color: var(--gold);
        }

        nav {
            display: flex;
            align-items: center;
            gap: 30px;
        }

        nav a {
            text-decoration: none;
            font-size: 15px;
            color: var(--ink);
            transition: color 0.2s ease;
        }

        nav a:hover {
            color: var(--gold-deep);
        }

        .cart-link {
            background: var(--ink);
            color: var(--paper) !important;
            padding: 9px 20px;
            border-radius: 3px;
            font-size: 14px;
        }

        /* هيرو */
        .hero {
            display: grid;
            grid-template-columns: 1fr 1fr;
            align-items: center;
            gap: 60px;
            padding: 70px 8%;
            max-width: 1280px;
            margin: 0 auto;
        }

        .hero-copy h1 {
            font-size: 46px;
            font-weight: 600;
            line-height: 1.3;
            margin-bottom: 18px;
        }

        .hero-copy p {
            font-size: 17px;
            color: var(--text-soft);
            max-width: 420px;
            margin-bottom: 30px;
        }

        .btn-solid {
            display: inline-block;
            background: var(--ink);
            color: var(--paper);
            padding: 15px 34px;
            border-radius: 3px;
            text-decoration: none;
            font-weight: 600;
            font-size: 15px;
            border: none;
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .btn-solid:hover {
            background: var(--gold-deep);
        }

        .hero-image {
            background: var(--paper-dim);
            border-radius: 6px;
            overflow: hidden;
            aspect-ratio: 4 / 3;
        }

        .hero-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* شريط المميزات */
        .features {
            background: var(--paper-dim);
            padding: 34px 8%;
        }

        .features-inner {
            max-width: 1140px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
            text-align: center;
        }

        .feature h4 {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .feature p {
            font-size: 13px;
            color: var(--text-soft);
        }

        /* المنتجات */
        .products {
            max-width: 1140px;
            margin: 0 auto;
            padding: 80px 8%;
        }

        .section-heading {
            margin-bottom: 40px;
        }

        .section-heading h2 {
            font-size: 30px;
            font-weight: 600;
            margin-bottom: 6px;
        }

        .section-heading p {
            color: var(--text-soft);
            font-size: 15px;
        }

        .product-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 26px;
        }

        .product {
            background: var(--paper);
            border: 1px solid var(--line);
            border-radius: 6px;
            overflow: hidden;
            transition: border-color 0.25s ease;
        }

        .product:hover {
            border-color: var(--gold);
        }

        .product-image {
            height: 320px;
            background: var(--paper-dim);
            display: flex;
            align-items: center;
            justify-content: center;
            border-bottom: 1px solid var(--line);
            overflow: hidden;
        }

        .product-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .product-info {
            padding: 22px;
        }

        .product h3 {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 6px;
        }

        .product .tag {
            font-size: 13px;
            color: var(--text-soft);
            margin-bottom: 14px;
        }

        .price {
            font-size: 20px;
            font-weight: 700;
            color: var(--gold-deep);
            margin-bottom: 16px;
        }

        .add-button {
            display: block;
            width: 100%;
            background: var(--ink);
            color: var(--paper);
            border: none;
            padding: 12px;
            border-radius: 3px;
            cursor: pointer;
            font-size: 14px;
            font-family: 'Inter', sans-serif;
            font-weight: 600;
            text-align: center;
            text-decoration: none;
            transition: background 0.2s ease;
            box-sizing: border-box;
        }

        .add-button:hover {
            background: var(--gold-deep);
        }

        /* فوتر */
        footer {
            background: var(--paper-dim);
            border-top: 1px solid var(--line);
            padding: 50px 8% 30px;
        }

        .footer-inner {
            max-width: 1140px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 40px;
            padding-bottom: 30px;
        }

        .footer-brand .brand {
            margin-bottom: 12px;
        }

        .footer-brand p {
            color: var(--text-soft);
            font-size: 14px;
            max-width: 380px;
        }

        .footer-links h4 {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 14px;
        }

        .footer-links a {
            display: block;
            text-decoration: none;
            color: var(--text-soft);
            font-size: 14px;
            margin-bottom: 10px;
        }

        .footer-links a:hover {
            color: var(--gold-deep);
        }

        .footer-bottom {
            text-align: center;
            font-size: 13px;
            color: var(--text-soft);
            border-top: 1px solid var(--line);
            padding-top: 20px;
        }

        #message {
            position: fixed;
            bottom: 25px;
            left: 25px;
            background: var(--ink);
            color: var(--paper);
            padding: 14px 22px;
            border-radius: 4px;
            font-weight: 500;
            display: none;
            z-index: 100;
        }

        @media (max-width: 780px) {
            .hero {
                grid-template-columns: 1fr;
                padding: 40px 6% 50px;
                gap: 30px;
            }
            .hero-copy h1 { font-size: 32px; }
            header { flex-direction: column; gap: 16px; padding: 18px 6%; }
            nav { gap: 16px; flex-wrap: wrap; justify-content: center; }
            .features-inner { grid-template-columns: 1fr; gap: 20px; }
            .footer-inner { grid-template-columns: 1fr; }
        }

/* صفحات المحتوى البسيطة (سياسات، من نحن، تواصل) */
.page-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 70px 8% 100px;
}

.page-content h1 {
    font-size: 34px;
    font-weight: 600;
    margin-bottom: 24px;
}

.page-content p {
    color: var(--text-soft);
    font-size: 16px;
    margin-bottom: 16px;
}

.page-content .coming-soon {
    background: var(--paper-dim);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 24px;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-soft);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.contact-item strong {
    min-width: 90px;
    display: inline-block;
}

/* معاينة الطاقية في الهيرو */
.cap-preview-wrap {
    background: var(--paper-dim);
    border-radius: 6px;
    padding: 30px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cap-preview-wrap svg {
    width: 100%;
    height: 100%;
}

/* مُخصص الطاقية */
.builder-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.builder-preview {
    background: var(--paper-dim);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 30px;
    position: sticky;
    top: 20px;
}

.builder-preview svg {
    width: 100%;
    height: auto;
}

.builder-options {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.option-block h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.color-swatches {
    display: flex;
    gap: 12px;
}

.swatch {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--line);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.swatch:hover {
    transform: scale(1.08);
}

.swatch-active {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--gold);
}

.swatch-white {
    border-color: #d4d0c8;
}

.option-block input[type="text"] {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
}

.option-block input[type="text"]:focus {
    outline: none;
    border-color: var(--gold);
}

.option-block .hint {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 8px;
}

.builder-options .price {
    font-size: 26px;
    font-weight: 700;
    color: var(--gold-deep);
}

.builder-options .add-button {
    max-width: 320px;
}

@media (max-width: 780px) {
    .builder-layout {
        grid-template-columns: 1fr;
    }
    .builder-preview {
        position: static;
    }
}

/* الهيرو المبسط (نصي بدون صورة ثابتة) */
.hero-simple {
    display: block;
    text-align: center;
    padding: 70px 8% 30px;
}

.hero-copy-center {
    max-width: 600px;
    margin: 0 auto;
}

.hero-copy-center p {
    margin-left: auto;
    margin-right: auto;
}

/* حاوية الكانفاس ثلاثي الأبعاد */
.cap-canvas-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 460px;
    margin: 0 auto;
}

.cap-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.drag-hint {
    text-align: center;
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 10px;
}

/* أزرار تبديل الفئات (الصافية، مخملية، Beanie، Boater) */
.category-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cat-tab {
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 10px 22px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cat-tab:hover {
    border-color: var(--gold);
}

.cat-tab-active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* أزرار المقاسات S / M / L */
.size-options {
    display: flex;
    gap: 10px;
}

.size-btn {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-btn:hover {
    border-color: var(--gold);
}

.size-btn-active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
