:root {
    --page-bg: #F3EEE5; --page-bg-deep: #EAE3D5; --surface: #FAF7F1; --surface-alt: #F5F0E6; --input-bg: #F5EFE3;
    --text: #1B2430; --text-soft: #4A5461; --text-muted: #8B95A1;
    --gold: #B08D3F; --gold-light: #C9A961; --gold-dark: #8A6D2B; --gold-bg: rgba(176,141,63,0.08); --gold-border: rgba(176,141,63,0.28);
    --header-bg: #0A192F; --header-text: #E6C87A; --danger: #E2574C; --whatsapp: #25D366;
    --sidebar-width: 220px; --header-height: 52px;
    --shadow-sm: 0 2px 8px rgba(90,70,30,0.06); --shadow-md: 0 6px 20px rgba(90,70,30,0.09); --shadow-lg: 0 12px 40px rgba(90,70,30,0.13);
    --card-w: 210px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--page-bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    padding-right: var(--sidebar-width);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--page-bg-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-light); border-radius: 4px; }

#particleCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; }

header {
    position: fixed; top: 0; left: 0; right: 0;
    display: flex; justify-content: center; align-items: center;
    padding: 0.6rem 16px;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(230,200,122,0.25);
    box-shadow: 0 2px 12px rgba(10,25,47,0.15);
    height: var(--header-height);
    padding-right: calc(var(--sidebar-width) + 2rem);
    z-index: 1000;
}
@media(max-width:768px) { header { padding-right: 1rem; justify-content: end} }

.logo {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, #F5E1A8, var(--header-text));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1;
    text-decoration: none;
}

.burger-btn {
    display: none; position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; color: var(--header-text); font-size: 1.8rem; cursor: pointer; z-index: 120;
}

.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10,25,47,0.45); z-index: 105; display: none; }
.overlay.active { display: block; }

.sidebar {
    position: fixed; top: 0; right: 0; width: var(--sidebar-width); height: 100vh;
    background: var(--surface); border-left: 1px solid var(--gold-border);
    box-shadow: -2px 0 14px rgba(90,70,30,0.06);
    padding: 1rem 0.8rem; overflow-y: auto; transition: transform 0.3s; z-index: 1001;
}
.sidebar h3 { font-family: 'Amiri', serif; color: var(--gold-dark); margin-bottom: 0.8rem; font-size: 1.1rem; }
.search-label { display: block; color: var(--gold-dark); margin-bottom: 0.4rem; font-size: 0.9rem; }
.search-wrapper { display: flex; gap: 0.3rem; margin-bottom: 1rem; align-items: center; }
.search-box { flex: 1; min-width: 0; padding: 0.4rem 0.6rem; background: var(--input-bg); border: 1px solid var(--gold-border); border-radius: 12px; color: var(--text); outline: none; font-size: 0.8rem; font-family: 'Tajawal', sans-serif; }
.search-box::placeholder { color: var(--text-muted); }
.search-box:focus { border-color: var(--gold); }
.search-btn { padding: 2px 3px; color: #FFFFFF; border: 1px solid rgba(201, 169, 97, 1.00); border-radius: 10px; cursor: pointer; }
.search-btn img{ width: 20px; }
.sidebar-btn { display: block; width: 100%; padding: 0.5rem 0.8rem; margin-bottom: 0.4rem; background: transparent; border: 1px solid var(--gold-border); color: var(--text); border-radius: 8px; cursor: pointer; text-align: right; font-size: 0.9rem; font-family: 'Tajawal', sans-serif; transition: all 0.3s; }
.sidebar-btn:hover, .sidebar-btn.active { background: var(--gold); color: #FFFFFF; border-color: var(--gold); font-weight: 700; }

main.main-content-wrapper { padding-top: var(--header-height); }
.main-container { display: block; min-height: calc(100vh - var(--header-height)); }
.main-container.hidden { display: none !important; }
.home-page { display: none; width: 100%; padding: 0; }
.home-page:not(.active) { display: none !important; }
.home-page.active { display: block; }
.products-area[style*="display:none"], .products-area[style*="display: none"] { display: none !important; }
.product-detail { display: none; padding-bottom: 100px; }
.product-detail:not(.active) { display: none !important; }
.product-detail.active { display: block; }
.search-page, .custom-page, .contact-page, .privacy-page { display: none; }
.search-page:not(.active), .custom-page:not(.active), .contact-page:not(.active), .privacy-page:not(.active) { display: none !important; }
.home-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem 1rem; }

.hero-image { position: relative; width: 100%; height: clamp(320px, 62vh, 620px); border-bottom: 1px solid var(--gold-border); overflow: hidden; background: linear-gradient(135deg, var(--header-bg), var(--gold-dark)); box-shadow: 0 4px 24px rgba(10,25,47,0.12); }
.hero-image::after { content: ""; width: 100%; height: 100%; left: 0; top: 0; background-color:#0000002e; position: absolute; z-index: 3; }
.hero-image a {
     z-index: 100;
      position: absolute;
       left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        color: white; 
        text-decoration: none; 
        border: 1px solid white; 
        padding: 10px 20px; 
        border-radius: 5px; 
        transition: .1s; }
.hero-image a:hover {
    background-color: var(--gold-dark);
    border-color: var(--gold-light);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.25),
                0 8px 24px rgba(138, 109, 43, 0.35);
    /* لا transform — الزر يبقى ثابتاً تماماً */
}
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; display: block; animation: heroFloat 10s ease-in-out infinite; will-change: transform; transform-origin: center center; }
@keyframes heroFloat { 0% { transform: scale(1.06) translateX(-1.2%); } 25% { transform: scale(1.08) translateX(0%); } 50% { transform: scale(1.10) translateX(1.2%); } 75% { transform: scale(1.08) translateX(0%); } 100% { transform: scale(1.06) translateX(-1.2%); } }
.hero-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; z-index: 1; text-align: center; padding: 1rem; background-image: url(../img/landing.webp); background-repeat: no-repeat; background-size: cover; background-position: center; animation: heroFallbackFloat 12s ease-in-out infinite; will-change: background-position, transform; }
@keyframes heroFallbackFloat { 0% { transform: scale(1.04) translateX(-1.2%); } 50% { transform: scale(1.08) translateX(1.2%); } 100% { transform: scale(1.04) translateX(-1.2%); } }
@media (prefers-reduced-motion: reduce) { .hero-image img, .hero-fallback { animation: none !important; } }

.hero-caption { text-align: center; color: var(--text-soft); font-size: 0.95rem; line-height: 1.9; margin: 1.6rem auto 2.2rem; max-width: 720px; padding: 0 0.5rem; }
.featured-section h2, .recently-viewed-section h2 { font-family: 'Amiri', serif; color: var(--gold-dark); text-align: center; font-size: 1.6rem; margin-bottom: 1.4rem; letter-spacing: 0.05em; }
.recently-viewed-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px dashed var(--gold-border); }
.view-all-wrapper { display: flex; justify-content: center; margin: 2.5rem 0 0.5rem; }
.view-all-btn { padding: 0.75rem 2.6rem; background: var(--surface); border: 1.5px solid var(--gold); color: var(--gold-dark); border-radius: 30px; cursor: pointer; font-family: 'Tajawal', sans-serif; font-weight: 700; font-size: 1rem; transition: all 0.35s; display: inline-flex; align-items: center; gap: 0.6rem; box-shadow: var(--shadow-sm); }
.view-all-btn:hover { background: var(--gold); color: #FFFFFF; box-shadow: 0 8px 25px rgba(176,141,63,0.28); transform: translateY(-2px); }
.view-all-btn .arrow { transition: transform 0.35s; display: inline-block; }
.view-all-btn:hover .arrow { transform: translateX(-5px); }
.home-footer { margin-top: 3rem; padding: 2rem 1rem 60px; border-top: 1px solid var(--gold-border); text-align: center; }
.home-footer .footer-links { display: flex; justify-content: center; gap: 1.8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.home-footer .footer-links a { color: var(--gold-dark); text-decoration: none; font-size: 0.95rem; transition: color 0.3s; cursor: pointer; font-weight: 500; }
.home-footer .footer-links a:hover { color: var(--gold); text-decoration: underline; }
.home-footer .footer-copy { color: var(--text-muted); font-size: 0.8rem; }
.home-categories { display: none; padding: 1rem; gap: 1rem; grid-template-columns: 1fr; }
.home-categories:not(.active) { display: none !important; }
.home-categories.active { display: grid; }

.products-area { width: 100%; padding: 1rem 1.5rem; padding-bottom: 100px; }
.products-area h2 { font-family: 'Amiri', serif; color: var(--gold-dark); font-size: 1.5rem; margin-bottom: 1rem; text-align: center; }
.sort-wrapper { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; flex-wrap: wrap; justify-content: center; }
.sort-btn { padding: 0.4rem 0.9rem; background: var(--surface); border: 1px solid var(--gold-border); color: var(--text); border-radius: 20px; cursor: pointer; font-size: 0.8rem; font-family: 'Tajawal', sans-serif; transition: all 0.3s; }
.sort-btn:hover { border-color: var(--gold); }
.sort-btn.active { background: var(--gold); color: #FFFFFF; border-color: var(--gold); font-weight: 700; }

.products-grid { display: grid; grid-template-columns: repeat(auto-fit, var(--card-w)); justify-content: center; gap: 1.1rem; padding: 0 0.5rem; }
.product-card { background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--gold-border); box-shadow: var(--shadow-sm); cursor: pointer; position: relative; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s; display: flex; flex-direction: column; height: 100%; width: 100%; }
.product-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow-md); }
.product-image { width: 100%; height: 220px; background: linear-gradient(135deg, #F7F1E6, #EDE4D3); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; flex-shrink: 0; }
.product-image img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.product-initial { font-family: 'Amiri', serif; font-size: 4rem; color: var(--gold-light); display: none; align-items: center; justify-content: center; width: 100%; height: 100%; }
.product-info { padding: 0.75rem 0.9rem 0.9rem; display: flex; flex-direction: column; flex: 1; gap: 0.35rem; }
.product-name { font-family: 'Amiri', serif; font-size: 1rem; color: var(--text); line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.product-inspiration { font-size: 0.72rem; color: var(--text-muted); font-style: italic; line-height: 1.4; margin: 0; min-height: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-inspiration .lbl { color: var(--gold-dark); font-weight: 600; font-style: normal; }
.product-price { font-size: 1rem; font-weight: 700; color: var(--gold-dark); margin-top: auto; padding-top: 0.35rem; line-height: 1.3; }
.product-price .old-price { text-decoration: line-through; color: var(--text-muted); font-size: 0.8rem; margin-left: 6px; font-weight: 400; }
.add-btn { width: 100%; padding: 0.55rem; background: var(--gold); color: #FFFFFF; border: none; border-radius: 15px; cursor: pointer; font-weight: 700; font-size: 0.8rem; font-family: 'Tajawal', sans-serif; transition: all 0.3s; margin-top: 0.2rem; }
.add-btn:hover { background: var(--gold-light); }
.sale-badge { position: absolute; top: 10px; right: 10px; background: var(--danger); color: white; padding: 4px 10px; border-radius: 15px; font-size: 0.7rem; font-weight: bold; z-index: 5; }

.product-image.full-bleed img { padding: 0 !important; object-fit: fill !important; }
.detail-image-area.full-bleed img { padding: 0 !important; object-fit: fill !important; }

.product-detail { padding: 2rem; max-width: 1200px; margin: 0 auto; padding-bottom: 75px; }
.detail-image-area.full-bleed { height: 230px; }
.back-btn { background: var(--surface); border: 1px solid var(--gold-border); color: var(--gold-dark); padding: 0.4rem 1rem; border-radius: 15px; cursor: pointer; margin-bottom: 1.5rem; font-size: 0.9rem; font-family: 'Tajawal', sans-serif; box-shadow: var(--shadow-sm); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-weight: 600; transition: background 0.3s; }
.back-btn:hover { background: var(--gold-bg); border-color: var(--gold); }
.detail-wrapper { display: flex; gap: 2rem; align-items: flex-start; margin-bottom: 2rem; }
.detail-image-area { flex: 0 0 300px; width: 300px; height: 400px; background: linear-gradient(135deg, #F7F1E6, #EDE4D3); border: 1px solid var(--gold-border); box-shadow: var(--shadow-md); border-radius: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: sticky; top: 80px; }
.detail-image-area img { width: 100%; height: 100%; object-fit: contain; padding: 15px; }
.detail-image-area .product-initial { font-size: 8rem; display: none; }
.detail-info-area { flex: 1; padding: 1rem; }
.detail-info-area h2 { font-family: 'Amiri', serif; color: var(--text); font-size: 2.2rem; margin-bottom: 0.5rem; }
.detail-inspired-by { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--gold-border); }
.detail-inspired-by span { color: var(--gold-dark); font-weight: 600; font-family: 'Amiri', serif; font-size: 1.05rem; }
.detail-section { background: var(--surface); border-right: 3px solid var(--gold-light); box-shadow: var(--shadow-sm); padding: 0.8rem 1rem; margin-bottom: 0.7rem; border-radius: 8px; transition: all 0.3s; }
.detail-section:hover { background: var(--gold-bg); border-right-color: var(--gold); }
.detail-section-title { font-family: 'Amiri', serif; color: var(--gold-dark); font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.detail-section-text { color: var(--text-soft); font-size: 0.9rem; line-height: 1.8; }
.size-selector { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.size-btn { padding: 0.5rem 1.5rem; margin-left: 0.5rem; background: var(--surface); border: 1px solid var(--gold-border); color: var(--gold-dark); border-radius: 20px; cursor: pointer; font-family: 'Tajawal', sans-serif; transition: all 0.3s; }
.size-btn:hover { border-color: var(--gold); }
.size-btn.active { background: var(--gold); color: #FFFFFF; border-color: var(--gold); font-weight: 700; }
.detail-price { font-size: 1.8rem; font-weight: 700; color: var(--gold-dark); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-price .old-price { text-decoration: line-through; color: var(--text-muted); font-size: 1.2rem; font-weight: 400; }
.detail-add-btn { padding: 0.7rem 2rem; background: var(--gold); color: #FFFFFF; border: none; border-radius: 25px; cursor: pointer; font-weight: 700; font-size: 1rem; font-family: 'Tajawal', sans-serif; transition: all 0.3s; }
.detail-add-btn:hover { background: var(--gold-light); box-shadow: 0 5px 18px rgba(176,141,63,0.35); }

.related-section { padding: 2rem 0 1rem; text-align: center; margin-top: 1.5rem; border-top: 1px dashed var(--gold-border); }
.related-section h3 { font-family: 'Amiri', serif; color: var(--gold-dark); font-size: 1.3rem; margin-bottom: 1.4rem; text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, var(--card-w)); justify-content: center; gap: 1.1rem; max-width: 1000px; margin: 0 auto; padding: 0 0.5rem; }

/* Floating buttons + safe-area */
.floating-cart-btn, .floating-whatsapp-btn {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 55px; height: 55px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 900; font-size: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}
.floating-cart-btn {
    left: calc(20px + env(safe-area-inset-left, 0px));
    background: var(--header-bg); color: var(--header-text);
    border: 2px solid var(--gold); box-shadow: 0 8px 22px rgba(10,25,47,0.25);
}
.floating-cart-btn.bounce { animation: bounceCart 0.4s ease; }
@keyframes bounceCart { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.floating-whatsapp-btn {
    right: calc(var(--sidebar-width) + 20px + env(safe-area-inset-right, 0px));
    box-shadow: 0 8px 22px rgba(37,211,102,0.35);
}
.floating-whatsapp-btn img { width: 140%; }
@media(max-width:768px) {
    .floating-whatsapp-btn { right: calc(20px + env(safe-area-inset-right, 0px)); }
    .floating-cart-btn, .floating-whatsapp-btn { width: 48px; height: 48px; }
    .floating-whatsapp-btn img { width: 130%; }
}
.floating-cart-badge { position: absolute; top: -5px; right: -5px; background: var(--danger); color: white; border-radius: 50%; width: 20px; height: 20px; font-size: 0.7rem; display: flex; align-items: center; justify-content: center; font-weight: bold; }

.fly-to-cart { position: fixed; z-index: 999999; pointer-events: none; width: 50px; height: 50px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold); box-shadow: 0 4px 15px rgba(176,141,63,0.5); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--gold-dark); }
.fly-to-cart img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

.cart-drawer { position: fixed; top: 0; left: -400px; width: 400px; height: 100vh; background: var(--surface); border-right: 1px solid var(--gold-border); box-shadow: 6px 0 24px rgba(90,70,30,0.12); transition: left 0.4s; z-index: 1000; display: flex; flex-direction: column; }
.cart-drawer.open { left: 0; }
@media(max-width:768px) { .cart-drawer { width: 100%; left: -100%; } }
.cart-header { padding: 1rem 1.2rem; border-bottom: 1px solid var(--gold-border); display: flex; justify-content: space-between; align-items: center; background: var(--surface-alt); }
.cart-header h3 { font-family: 'Amiri', serif; color: var(--gold-dark); font-size: 1.3rem; }
.close-cart {
    font-weight: bold; cursor: pointer; font-size: 1.3rem; color: var(--gold-dark);
    background: none; border: none;
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: background 0.2s;
}
.close-cart:hover { background: var(--gold-bg); }

.cart-items { flex: 1; overflow-y: auto; padding: 1rem; z-index: 10001; }
.cart-item { display: flex; justify-content: space-between; align-items: center; gap: 0.7rem; padding: 0.8rem; margin-bottom: 0.5rem; background: var(--surface-alt); border: 1px solid var(--gold-border); border-radius: 10px; }
.cart-item-image { flex-shrink: 0; width: 60px; height: 60px; border-radius: 8px; overflow: hidden; background: #F7F1E6; display: flex; align-items: center; justify-content: center; }
.cart-item-image img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info h4 { color: var(--text); margin-bottom: 0.3rem; font-size: 0.9rem; line-height: 1.3; }
.cart-item-info p { font-size: 0.85rem; color: var(--gold-dark); font-weight: 700; }
.cart-item-controls { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.qty-btn { background: var(--surface); border: 1px solid var(--gold-border); color: var(--gold-dark); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-weight: 700; }
.qty-btn:hover { border-color: var(--gold); }
.qty-value { font-weight: 700; color: var(--text); min-width: 26px; text-align: center; font-size: 0.9rem; }
.delete-btn { background: var(--danger); color: white; border: none; padding: 0.4rem 0.6rem; border-radius: 8px; cursor: pointer; font-family: 'Tajawal', sans-serif; font-size: 0.78rem; }
.cart-footer { padding: 1.2rem; border-top: 1px solid var(--gold-border); background: var(--surface-alt); padding-bottom: 70px; }
.total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; color: var(--gold-dark); margin-bottom: 0.8rem; }
.checkout-btn { width: 100%; padding: 0.8rem; background: var(--gold); color: #FFFFFF; border: none; border-radius: 20px; cursor: pointer; font-weight: 700; font-family: 'Tajawal', sans-serif; font-size: 1rem; }
.clear-cart-btn { width: 100%; padding: 0.6rem; background: var(--danger); color: white; border: none; border-radius: 20px; cursor: pointer; font-weight: 700; font-family: 'Tajawal', sans-serif; margin-bottom: 0.5rem; }

.search-page, .custom-page, .contact-page, .privacy-page { padding: 0.6rem 2rem 3rem; max-width: 800px; margin: 0 auto; }
.page-header { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.3rem; padding: 0.9rem 1.1rem; background: var(--surface); border: 1px solid var(--gold-border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.page-header .page-titles { flex: 1; text-align: right; min-width: 0; }
.page-header h2 { font-family: 'Amiri', serif; color: var(--gold-dark); font-size: 1.35rem; margin-bottom: 0.15rem; line-height: 1.3; }
.page-header p { color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; margin: 0; }

.custom-form { background: var(--surface); padding: 2rem; border-radius: 15px; border: 1px solid var(--gold-border); box-shadow: var(--shadow-md); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--gold-dark); font-weight: 500; }
.form-group input, .form-group textarea { width: 100%; padding: 0.7rem; background: var(--input-bg); border: 1px solid var(--gold-border); border-radius: 8px; color: var(--text); font-family: 'Tajawal', sans-serif; outline: none; transition: border-color 0.3s; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--gold); }
.form-group input.error, .form-group textarea.error { border-color: var(--danger); background: rgba(226, 87, 76, 0.04); }
.form-group textarea { min-height: 120px; resize: vertical; }
.submit-btn { background: var(--gold); color: #FFFFFF; border: none; padding: 0.8rem 2rem; border-radius: 25px; cursor: pointer; font-weight: 700; width: 100%; font-family: 'Tajawal', sans-serif; font-size: 1rem; transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.submit-btn:hover { background: var(--gold-light); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Spinner */
.btn-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
    vertical-align: middle;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

.contact-info { background: var(--surface); padding: 1.4rem; border-radius: 15px; border: 1px solid var(--gold-border); box-shadow: var(--shadow-md); }
.contact-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; margin-bottom: 0.7rem; margin-top: 0.7rem; background: var(--surface-alt); border-radius: 12px; border: 1px solid var(--gold-border); transition: all 0.3s; }
.contact-item:last-child { margin-bottom: 0; }
.contact-item:hover { background: var(--gold-bg); border-color: var(--gold); transform: translateX(-3px); }
.contact-item .contact-text { text-align: center; flex: 1; }
.contact-item .contact-text .label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.contact-item .contact-text .value { font-size: 1rem; color: var(--gold-dark); font-weight: 700; direction: ltr; text-align: center; }
.contact-link { text-decoration: none; color: inherit; display: block; }

.privacy-card { background: var(--surface); padding: 2rem; border-radius: 15px; border: 1px solid var(--gold-border); line-height: 2; color: var(--text-soft); font-size: 0.95rem; box-shadow: var(--shadow-md); }
.privacy-card h3 { font-family: 'Amiri', serif; color: var(--gold-dark); font-size: 1.05rem; margin: 1rem 0 0.4rem; }
.privacy-card ul { padding-right: 1.3rem; }
.privacy-card a { color: var(--gold-dark); font-weight: 600; }

/* Checkout modal */
.checkout-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; display: none; align-items: center; justify-content: center; }
.checkout-modal.active { display: flex; }
.checkout-modal .modal-overlay { position: absolute; inset: 0; background: rgba(10,25,47,0.5); }
.checkout-modal .modal-content { position: relative; background: var(--surface); border: 1px solid var(--gold-border); border-radius: 15px; padding: 2rem; max-width: 500px; width: 90%; z-index: 1; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.checkout-modal h2 { font-family: 'Amiri', serif; color: var(--gold-dark); margin-bottom: 1rem; text-align: center; }
.close-modal {
    position: absolute; top: 10px; left: 10px;
    background: transparent; border: none; color: var(--gold-dark);
    font-size: 1.5rem; cursor: pointer;
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: background 0.2s;
}
.close-modal:hover { background: var(--gold-bg); }

/* Checkout summary */
.checkout-summary {
    background: var(--gold-bg);
    border: 1px solid var(--gold-border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.2rem;
}
.checkout-summary h3 {
    font-family: 'Amiri', serif;
    color: var(--gold-dark);
    font-size: 1rem;
    margin-bottom: 0.7rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--gold-border);
}
.checkout-summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.7rem;
    max-height: 180px;
    overflow-y: auto;
}
.checkout-summary-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.35rem 0;
    font-size: 0.82rem;
    color: var(--text-soft);
    border-bottom: 1px dotted rgba(176,141,63,0.15);
}
.checkout-summary-list li:last-child { border-bottom: none; }
.checkout-item-name { flex: 1; min-width: 0; word-break: break-word; }
.checkout-item-price { font-weight: 700; color: var(--gold-dark); white-space: nowrap; }
.checkout-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 0.6rem;
    border-top: 1px solid var(--gold-border);
    font-weight: 700;
    color: var(--gold-dark);
    font-size: 0.95rem;
}

/* Guarantee badges */
.guarantee-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    max-width: 820px;
    margin: 0.5rem auto 1.5rem;
    padding: 0 0.3rem;
}
.guarantee-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--gold-border);
    border-radius: 25px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gold-dark);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, border-color 0.25s;
}
.guarantee-badge:hover { transform: translateY(-2px); border-color: var(--gold); }
.gb-icon { font-size: 1.1rem; line-height: 1; }

.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--surface); border: 1px solid var(--gold-border); box-shadow: var(--shadow-lg); color: var(--text); padding: 1rem 1.5rem; border-radius: 12px; z-index: 3000; opacity: 0; transition: all 0.4s; font-size: 0.9rem; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 0.3rem; display: none; }
.no-results { text-align: center; color: var(--text-muted); padding: 2rem; font-size: 1rem; }

body.no-scroll { overflow: hidden; }

.product-image img, .detail-image-area img { opacity: 1; transition: opacity 0.4s ease; }
.product-image.loading::before, .detail-image-area.loading::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(201,169,97,0.05) 20%, rgba(201,169,97,0.28) 50%, rgba(201,169,97,0.05) 80%);
    background-size: 200% 100%; animation: shimmerEffect 1.4s infinite linear; z-index: 3; pointer-events: none;
}
@keyframes shimmerEffect { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Touch active feedback */
button:active:not(:disabled),
a:active,
[role="button"]:active,
.product-card:active {
    filter: brightness(0.92);
    transition: filter 0.08s ease;
}

/* Skip link */
.skip-link {
    position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
    background: var(--gold); color: #fff; padding: 0.8rem 1.5rem;
    border-radius: 0 0 12px 12px; text-decoration: none; font-weight: 700;
    z-index: 10000; transition: top 0.3s;
}
.skip-link:focus { top: 0; outline: 2px solid #fff; outline-offset: 2px; }

button:focus-visible, [role="button"]:focus-visible, input:focus-visible,
textarea:focus-visible, a:focus-visible, .size-btn:focus-visible, .sort-btn:focus-visible, .sidebar-btn:focus-visible {
    outline: 3px solid var(--gold); outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(176, 141, 63, 0.15);
    border-radius: 6px;
}
.product-card[role="button"]:focus-visible {
    outline: 2px solid var(--gold); outline-offset: 2px; transform: translateY(-2px);
}

/* Trust bar */
.trust-bar {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 0.7rem; max-width: 820px; margin: 0.5rem auto 1.5rem; padding: 0 0.3rem;
}
.trust-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
    padding: 0.8rem 0.5rem; background: var(--surface); border: 1px solid var(--gold-border);
    border-radius: 12px; text-align: center; font-size: 0.82rem; font-weight: 500;
    color: var(--text-soft); box-shadow: var(--shadow-sm);
    transition: transform 0.25s, border-color 0.25s;
}
.trust-item:hover { transform: translateY(-2px); border-color: var(--gold); }
.trust-icon { font-size: 1.4rem; line-height: 1; }

.detail-trust {
    display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; padding-top: 1rem;
    border-top: 1px dashed var(--gold-border); font-size: 0.82rem; color: var(--text-muted);
}
.detail-trust span { color: var(--gold-dark); font-weight: 600; }

.checkout-trust {
    text-align: center; font-size: 0.82rem; color: var(--gold-dark);
    background: var(--gold-bg); padding: 0.55rem 0.75rem; border-radius: 10px;
    border: 1px solid var(--gold-border); margin-bottom: 1.2rem; font-weight: 600;
}

.empty-cart-msg { text-align: center; margin-top: 3rem; padding: 2rem 1rem; }
.empty-cart-msg::before { content: "🛍️"; display: block; font-size: 4rem; margin-bottom: 1rem; opacity: 0.6; }
.empty-cart-msg p { font-size: 1rem; margin-bottom: 1.2rem; color: var(--text-soft); font-weight: 500; }
.empty-cart-shop {
    background: var(--gold); color: #fff; border: none; padding: 0.7rem 1.6rem;
    border-radius: 25px; font-family: 'Tajawal', sans-serif; font-weight: 700;
    cursor: pointer; transition: background 0.3s;
}
.empty-cart-shop:hover { background: var(--gold-light); }

/* PDF notification */
.pdf-notification {
    position: fixed; bottom: 20px; left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--header-bg); color: var(--header-text);
    padding: 0.55rem 1.2rem; border-radius: 25px;
    font-size: 0.82rem; font-weight: 600; z-index: 4000; opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    pointer-events: none; box-shadow: 0 6px 22px rgba(10, 25, 47, 0.4);
    border: 1px solid rgba(230, 200, 122, 0.4);
    white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
    text-align: center; font-family: 'Tajawal', sans-serif;
}
.pdf-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Bestseller */
.bestseller-badge {
    position: absolute; top: 10px; left: 10px;
    background: linear-gradient(135deg, #FF6B35, #F7931E); color: #fff;
    padding: 4px 10px; border-radius: 15px; font-size: 0.68rem;
    font-weight: 700; z-index: 6; box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    animation: bestsellerPulse 2.5s ease-in-out infinite;
}
@keyframes bestsellerPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.detail-bestseller {
    display: inline-block; background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem;
    font-weight: 700; vertical-align: middle; margin-right: 8px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.product-image img, .detail-image-area img { aspect-ratio: 1 / 1; background: linear-gradient(135deg, #F7F1E6, #EDE4D3); }

@media (max-width: 768px) {
    #particleCanvas { display: none; }
    .back-btn { min-height: 44px; padding: 0.5rem 1.2rem; }
}

@media(max-width:768px){
    body { padding-right: 0; }
    .burger-btn { display: block; }
    .sidebar { transform: translateX(100%); width: 250px; }
    .sidebar.open { transform: translateX(0); }
    .detail-wrapper { flex-direction: column; }
    .detail-image-area { width: 100%; height: 300px; position: static; }
    .products-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; padding: 0 0.4rem; }
    .product-image { height: 170px; }
    .product-info { padding: 0.6rem 0.7rem 0.75rem; }
    .product-name { font-size: 0.88rem; min-height: 2.5em; }
    .product-inspiration { font-size: 0.66rem; }
    .product-price { font-size: 0.9rem; }
    .add-btn { font-size: 0.72rem; padding: 0.45rem; }
    .home-inner { padding: 0 0.6rem 0.6rem; }
    .hero-image { height: clamp(240px, 45vh, 400px); }
    .hero-caption { font-size: 0.88rem; margin: 1.2rem auto 1.6rem; }
    .home-footer .footer-links { gap: 1.2rem; }
    .detail-info-area h2 { font-size: 1.6rem; }
    .search-page, .custom-page, .contact-page, .privacy-page { padding: 0.4rem 1rem 2.5rem; }
    .page-header { padding: 0.75rem 0.85rem; gap: 0.7rem; margin-bottom: 1rem; }
    .page-header h2 { font-size: 1.15rem; }
    .page-header p { font-size: 0.75rem; }
    .custom-form { padding: 1.4rem; }
    .contact-info { padding: 1rem; }
    .privacy-card { padding: 1.4rem; }
    .checkout-modal .modal-content { padding: 1.4rem; }
    .guarantee-badge { font-size: 0.75rem; padding: 0.4rem 0.7rem; }
}
.floating-cart-btn.hidden, .floating-whatsapp-btn.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .bestseller-badge { animation: none !important; }
    .fly-to-cart { display: none !important; }
}
@media (hover: hover) and (pointer: fine) {
    .detail-image-area {
        overflow: hidden;
        
    }

    .detail-image-area img {
        /* سرعة ونعومة التكبير والتصغير */
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
        transform-origin: center center;
        transform: scale(1);
        will-change: transform; /* لتحسين الأداء */
    }

    /* عند مرور الماوس على الإطار، تتكبر الصورة بنعومة */
    .detail-image-area:hover img {
        transform: scale(2.5); 
    }
}