/* =============================================
   متجر النور - Design System & Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
    --gold: #C8A45C;
    --gold-light: #E0C078;
    --gold-dark: #8B6914;
    --gold-glow: rgba(200, 164, 92, 0.25);
    --bg-primary: #0A0A0F;
    --bg-secondary: #111118;
    --bg-card: #16161F;
    --bg-elevated: #1C1C28;
    --bg-input: #1A1A26;
    --text-primary: #F5F0E8;
    --text-secondary: #8A8A9A;
    --text-muted: #55556A;
    --success: #4CAF50;
    --error: #FF5252;
    --warning: #FFC107;
    --border: rgba(200, 164, 92, 0.1);
    --border-active: rgba(200, 164, 92, 0.35);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-gold: 0 4px 20px rgba(200,164,92,0.15);
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-h: 60px;
    --announcement-h: 30px;
    --bottom-nav-h: 65px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
    font-family: var(--font-ar);
    background: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--bottom-nav-h) + 20px);
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: inherit; outline: none; }
ul, ol { list-style: none; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 4px; }

/* --- Header --- */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-h);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px;
}
.header-title {
    font-size: 1.3rem; font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-btn {
    width: 40px; height: 40px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; position: relative; transition: var(--transition);
    color: var(--text-primary);
}
.header-btn:hover { border-color: var(--border-active); background: var(--bg-elevated); }
.cart-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--gold); color: var(--bg-primary);
    font-size: 0.65rem; font-weight: 700; font-family: var(--font-en);
    width: 18px; height: 18px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
}
.header-btn .wishlist-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--error); color: #fff;
    font-size: 0.65rem; font-weight: 700; font-family: var(--font-en);
    width: 18px; height: 18px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
}

/* --- Page Content --- */
.page-content { padding-top: calc(var(--header-h) + 20px); min-height: 100vh; }

/* --- Install Banner --- */
.install-banner {
    position: fixed; bottom: calc(var(--bottom-nav-h) + 12px);
    left: 16px; right: 16px; z-index: 90;
    background: linear-gradient(135deg, rgba(200,164,92,0.15), rgba(200,164,92,0.05));
    border: 1px solid var(--border-active);
    border-radius: var(--radius-lg); padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    transform: translateY(150%); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.install-banner.show { transform: translateY(0); }
.install-banner-icon { font-size: 2rem; flex-shrink: 0; }
.install-banner-text { flex: 1; }
.install-banner-text h4 { font-size: 0.85rem; font-weight: 700; color: var(--gold-light); margin-bottom: 2px; }
.install-banner-text p { font-size: 0.72rem; color: var(--text-secondary); }
.install-btn {
    padding: 8px 16px; border-radius: var(--radius-full);
    background: var(--gold); color: var(--bg-primary);
    font-weight: 700; font-size: 0.8rem; white-space: nowrap;
    transition: var(--transition);
}
.install-btn:hover { background: var(--gold-light); }
.install-close {
    background: none; color: var(--text-muted); font-size: 1.2rem;
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
}

/* --- Announcement Bar --- */
.announcement-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 99;
    height: var(--announcement-h);
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
    color: var(--bg-primary); text-align: center;
    padding: 0 16px; font-size: 0.75rem; font-weight: 700;
    overflow: hidden; white-space: nowrap;
}
.announcement-bar span {
    display: inline-block;
    animation: marquee 15s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- Hero Banner --- */
.hero-banner {
    margin: 12px 16px; border-radius: var(--radius-lg); overflow: hidden;
    background: linear-gradient(135deg, #1a1525, #0f1929);
    border: 1px solid var(--border); position: relative;
    padding: 28px 24px; min-height: 140px;
}
.hero-banner::before {
    content: ''; position: absolute; top: -50%; right: -30%;
    width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, var(--gold-glow), transparent);
    pointer-events: none;
}
.hero-banner h2 {
    font-size: 1.3rem; font-weight: 800; margin-bottom: 6px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-banner p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* --- Search Bar & Sort --- */
.search-container { padding: 12px 16px; }
.search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 10px 14px;
    transition: var(--transition);
    min-width: 0;
}
.search-bar:focus-within { border-color: var(--border-active); box-shadow: var(--shadow-gold); }
.search-bar input {
    flex: 1; background: none; border: none; color: var(--text-primary);
    font-size: 0.88rem; direction: rtl; width: 100%; min-width: 0;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar .search-icon { color: var(--text-muted); font-size: 1rem; flex-shrink: 0; }

.sort-wrapper {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    height: 42px;
    padding: 0 12px 0 26px;
    transition: var(--transition);
}
.sort-wrapper:hover, .sort-wrapper:focus-within {
    border-color: var(--border-active);
    box-shadow: var(--shadow-gold);
}
.sort-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    color: var(--gold-light);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding: 0;
    direction: rtl;
    height: 100%;
}
.sort-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px;
}
.sort-arrow {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-light);
    font-size: 0.75rem;
    pointer-events: none;
}

/* --- Categories --- */
.categories-section { padding: 8px 0; }
.section-title {
    font-size: 1.05rem; font-weight: 700; padding: 0 16px;
    margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.section-title::before {
    content: ''; width: 3px; height: 18px;
    background: var(--gold); border-radius: 2px;
}
.categories-scroll {
    display: flex; gap: 10px; padding: 0 16px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -ms-overflow-style: none; scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.category-chip {
    scroll-snap-align: start; flex-shrink: 0;
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-full);
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: 0.82rem; font-weight: 500; color: var(--text-secondary);
    transition: var(--transition); white-space: nowrap; cursor: pointer;
}
.category-chip.active, .category-chip:hover {
    background: linear-gradient(135deg, rgba(200,164,92,0.2), rgba(200,164,92,0.05));
    border-color: var(--gold); color: var(--gold-light);
}
.category-chip .cat-icon { font-size: 1.1rem; }

/* --- Products Grid --- */
.products-section { padding: 16px 0; }
.products-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 12px; padding: 0 16px;
}
.product-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: var(--transition); position: relative;
}
.product-card:hover { border-color: var(--border-active); transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.product-image {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    background: var(--bg-secondary);
}
.product-image-placeholder {
    width: 100%; aspect-ratio: 1; background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: var(--text-muted);
}
.product-info { padding: 10px 12px; }
.product-name {
    font-size: 0.82rem; font-weight: 600; margin-bottom: 6px;
    line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.product-price-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.product-price {
    font-family: var(--font-en); font-size: 0.9rem; font-weight: 700;
    color: var(--gold-light);
}
.product-original-price {
    font-family: var(--font-en); font-size: 0.72rem;
    color: var(--text-muted); text-decoration: line-through;
}
.discount-badge {
    position: absolute; top: 8px; left: 8px;
    background: var(--error); color: white;
    font-size: 0.65rem; font-weight: 700; font-family: var(--font-en);
    padding: 3px 8px; border-radius: var(--radius-full);
}
.add-to-cart-btn {
    width: 100%; padding: 8px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-primary); font-size: 0.78rem; font-weight: 700;
    transition: var(--transition); display: flex; align-items: center;
    justify-content: center; gap: 4px;
}
.add-to-cart-btn:hover { background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.add-to-cart-btn.added {
    background: var(--success); color: white;
}

/* --- Skeleton Loading --- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-image { width: 100%; aspect-ratio: 1; }
.skeleton-text { height: 14px; margin-bottom: 6px; width: 80%; }
.skeleton-text-sm { height: 12px; width: 50%; }

/* --- Empty State --- */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 60px 32px; text-align: center;
}
.empty-state-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 20px; }

/* --- Bottom Navigation --- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    height: var(--bottom-nav-h);
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 16px; border-radius: var(--radius-md);
    color: var(--text-muted); font-size: 0.65rem; font-weight: 500;
    transition: var(--transition); position: relative; background: none;
}
.nav-item.active { color: var(--gold); }
.nav-item .nav-icon { font-size: 1.3rem; }
.nav-item .nav-badge {
    position: absolute; top: 0; right: 8px;
    background: var(--gold); color: var(--bg-primary);
    font-size: 0.6rem; font-weight: 700; font-family: var(--font-en);
    width: 16px; height: 16px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
}

/* --- Toast --- */
.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px);
    z-index: 999; display: flex; align-items: center; gap: 8px;
    padding: 12px 20px; border-radius: var(--radius-full);
    background: var(--bg-elevated); border: 1px solid var(--border);
    backdrop-filter: blur(20px); font-size: 0.85rem; font-weight: 500;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap; box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }

/* --- Buttons --- */
.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px 24px; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-primary); font-size: 0.95rem; font-weight: 700;
    transition: var(--transition); box-shadow: var(--shadow-gold);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }
.btn-secondary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-lg);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 0.9rem; font-weight: 600;
    transition: var(--transition);
}
.btn-secondary:hover { border-color: var(--border-active); }

/* =============================================
   CART PAGE
   ============================================= */
.cart-page { padding: 16px; }
.cart-item {
    display: flex; gap: 12px; padding: 14px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); margin-bottom: 10px;
    transition: var(--transition); position: relative; overflow: hidden;
}
.cart-item-image {
    width: 80px; height: 80px; border-radius: var(--radius-md);
    object-fit: cover; background: var(--bg-secondary); flex-shrink: 0;
}
.cart-item-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.cart-item-name { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.cart-item-price { font-family: var(--font-en); font-size: 0.9rem; font-weight: 700; color: var(--gold-light); }
.cart-item-controls {
    display: flex; align-items: center; gap: 12px; margin-top: 8px;
}
.qty-btn {
    width: 30px; height: 30px; border-radius: var(--radius-sm);
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.qty-btn:hover { border-color: var(--gold); color: var(--gold); }
.qty-value { font-family: var(--font-en); font-size: 0.95rem; font-weight: 600; min-width: 20px; text-align: center; }
.cart-item-remove {
    position: absolute; top: 10px; left: 10px;
    background: rgba(255,82,82,0.1); color: var(--error);
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; transition: var(--transition);
}
.cart-item-remove:hover { background: rgba(255,82,82,0.2); }
.cart-summary {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px; margin-top: 16px;
}
.cart-summary-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: 0.9rem;
}
.cart-summary-row.total {
    border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px;
    font-size: 1.05rem; font-weight: 700;
}
.cart-summary-row.total .price { color: var(--gold-light); font-family: var(--font-en); }

/* =============================================
   CHECKOUT PAGE
   ============================================= */
.checkout-page { padding: 16px; }
.form-group { margin-bottom: 16px; }
.form-label {
    display: block; font-size: 0.82rem; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 6px;
}
.form-input, .form-textarea {
    width: 100%; padding: 12px 16px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-primary);
    font-size: 0.9rem; direction: rtl; transition: var(--transition);
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-input.error { border-color: var(--error); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-error { font-size: 0.72rem; color: var(--error); margin-top: 4px; display: none; }
.order-summary-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px;
}
.order-summary-card h3 {
    font-size: 0.95rem; font-weight: 700; margin-bottom: 12px;
    color: var(--gold-light);
}
.order-item-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; font-size: 0.82rem; color: var(--text-secondary);
}
.order-item-row .item-total { font-family: var(--font-en); font-weight: 600; color: var(--text-primary); }

/* --- Success Page --- */
.success-container {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 40px 24px; text-align: center;
    min-height: 60vh;
}
.success-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(76,175,80,0.2), rgba(76,175,80,0.05));
    border: 2px solid var(--success);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; margin-bottom: 20px;
    animation: pulse-success 2s ease-in-out infinite;
}
@keyframes pulse-success {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0.3); }
    50% { box-shadow: 0 0 0 15px rgba(76,175,80,0); }
}
.success-container h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.success-container p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.6; }

/* --- Back Button --- */
.back-header {
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px; margin-bottom: 16px;
}
.back-btn {
    width: 36px; height: 36px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-primary); font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.back-btn:hover { border-color: var(--gold); }
.page-title { font-size: 1.1rem; font-weight: 700; }

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.animate-in { animation: fadeInUp 0.4s ease-out forwards; }
.product-card { animation: fadeInUp 0.4s ease-out backwards; }
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

/* --- Responsive --- */
@media (min-width: 420px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (min-width: 640px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* =============================================
   NEW UX FEATURES STYLES
   ============================================= */

/* --- Floating Bottom Cart Bar --- */
.floating-cart-bar {
    position: fixed; bottom: calc(var(--bottom-nav-h) + 10px);
    left: 16px; right: 16px; z-index: 95;
    background: linear-gradient(135deg, rgba(28,28,40,0.95), rgba(22,22,31,0.95));
    border: 1px solid var(--gold); border-radius: var(--radius-xl);
    padding: 10px 16px; display: flex; align-items: center; justify-content: space-between;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 24px rgba(200, 164, 92, 0.25);
    animation: fadeInUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.floating-cart-info { display: flex; align-items: center; gap: 10px; }
.floating-cart-icon { font-size: 1.5rem; }
.floating-cart-text { display: flex; flex-direction: column; }
.floating-cart-count { font-size: 0.75rem; color: var(--text-secondary); }
.floating-cart-total { font-family: var(--font-en); font-size: 0.95rem; font-weight: 700; color: var(--gold-light); }
.floating-cart-btn {
    padding: 8px 18px; border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-primary); font-weight: 700; font-size: 0.82rem;
    box-shadow: var(--shadow-sm); transition: var(--transition);
}
.floating-cart-btn:hover { background: linear-gradient(135deg, var(--gold-light), var(--gold)); }

/* --- Wishlist Button on Product Cards --- */
.wishlist-card-btn {
    position: absolute; top: 8px; right: 8px; z-index: 10;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(10, 10, 15, 0.65); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; cursor: pointer; transition: var(--transition);
}
.wishlist-card-btn.active {
    background: rgba(255, 82, 82, 0.2); border-color: var(--error);
}

/* --- Quick View Button on Cards (anchored to the product image area) --- */
.product-media { position: relative; }
.quick-view-card-btn {
    position: absolute; bottom: 8px; right: 8px; z-index: 10;
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(10, 10, 15, 0.65); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: var(--text-primary); cursor: pointer;
    transition: var(--transition); opacity: 0.9;
}
.quick-view-card-btn:hover { border-color: var(--gold); color: var(--gold); }

/* --- Direct Card Quantity Controls --- */
.card-qty-controls {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 4px; border-radius: var(--radius-md);
    background: var(--bg-elevated); border: 1px solid var(--gold);
}
.card-qty-btn {
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    background: var(--gold); color: var(--bg-primary);
    font-weight: 700; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
}
.card-qty-btn.minus { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.card-qty-val { font-family: var(--font-en); font-weight: 700; font-size: 0.9rem; color: var(--gold-light); }

/* --- Quick View & Lightbox Modal Base --- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(12px);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }

.bottom-sheet {
    width: 100%; max-width: 550px; background: var(--bg-card);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 85vh; overflow-y: auto; position: relative;
}
.modal-overlay.show .bottom-sheet { transform: translateY(0); }

.modal-close-btn {
    position: absolute; top: 16px; left: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--text-muted); display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer; transition: var(--transition);
}
.modal-close-btn:hover { color: var(--text-primary); border-color: var(--gold); }

/* --- Lightbox Fullscreen Zoom --- */
.lightbox-content {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; width: 100%; position: relative; padding: 20px;
}
.lightbox-img {
    max-width: 95%; max-height: 80vh; object-fit: contain;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease; cursor: zoom-in;
}
.lightbox-img.zoomed { transform: scale(1.8); cursor: zoom-out; }

/* --- Orders & Wishlist Cards --- */
.order-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px;
}
.order-card-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 10px;
}
.order-number { font-family: var(--font-en); font-weight: 700; color: var(--gold-light); }
.status-badge {
    padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700;
}
.status-pending { background: rgba(255,193,7,0.15); color: var(--warning); border: 1px solid var(--warning); }
.status-confirmed { background: rgba(76,175,80,0.15); color: var(--success); border: 1px solid var(--success); }

/* --- Related Products horizontal scroll --- */
.related-products-scroll {
    display: flex; gap: 12px; overflow-x: auto; padding: 10px 16px;
    scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none;
}
.related-products-scroll::-webkit-scrollbar { display: none; }
.related-product-card {
    min-width: 140px; width: 140px; flex-shrink: 0; scroll-snap-align: start;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 8px; text-align: center;
}
.related-product-card img { width: 100%; height: 100px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 6px; }
.related-product-name { font-size: 0.75rem; font-weight: 600; line-clamp: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-product-price { font-family: var(--font-en); font-size: 0.8rem; color: var(--gold-light); font-weight: 700; }

/* =============================================
   STORE FOOTER STYLES
   ============================================= */
.store-footer {
    background: var(--bg-secondary); border-top: 1px solid var(--border);
    padding: 30px 20px calc(var(--bottom-nav-h) + 30px) 20px;
    text-align: center; margin-top: 40px; position: relative;
}
.footer-logo {
    font-size: 1.2rem; font-weight: 800;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 8px;
}
.footer-desc {
    font-size: 0.82rem; color: var(--text-secondary); max-width: 320px;
    margin: 0 auto 20px auto; line-height: 1.6;
}
.footer-socials {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin-bottom: 24px;
}
.social-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius-full);
    font-size: 0.85rem; font-weight: 700; text-decoration: none;
    transition: var(--transition); box-shadow: var(--shadow-sm);
}
.social-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff;
}
.social-btn.whatsapp:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }

.social-btn.facebook {
    background: linear-gradient(135deg, #1877F2, #0d52ab);
    color: #ffffff;
}
.social-btn.facebook:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4); }

.social-icon { font-size: 1.2rem; }

.footer-copy {
    font-size: 0.75rem; color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 16px; margin-top: 16px;
}

/* =============================================
   FLOATING ACTION BUTTONS (SHARE & WHATSAPP)
   ============================================= */
.floating-share-btn {
    position: fixed; bottom: calc(var(--bottom-nav-h) + 80px); left: 16px; z-index: 95;
    width: 50px; height: 50px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    color: var(--bg-primary); display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; text-decoration: none; border: none; cursor: pointer;
    box-shadow: var(--shadow-gold);
    transition: var(--transition); animation: sharePulse 2s infinite;
}
.floating-share-btn:hover {
    transform: scale(1.1); box-shadow: 0 6px 20px rgba(200, 164, 92, 0.6);
}
@keyframes sharePulse {
    0% { box-shadow: 0 0 0 0 rgba(200, 164, 92, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(200, 164, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 164, 92, 0); }
}

.floating-whatsapp-btn {
    position: fixed; bottom: calc(var(--bottom-nav-h) + 20px); left: 16px; z-index: 95;
    width: 50px; height: 50px; border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff; display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition); animation: whatsappPulse 2s infinite;
}
.floating-whatsapp-btn:hover {
    transform: scale(1.1); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}
@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* =============================================
   LIGHTBOX (scoped to #lightbox-modal so the
   generic .modal-overlay keeps the bottom-sheet
   behavior used by the Quick View modal)
   ============================================= */
#lightbox-modal {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}
#lightbox-modal.show {
    opacity: 1; visibility: visible;
}
#lightbox-modal .modal-close-btn {
    position: absolute; top: 20px; right: 20px; z-index: 10000;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.2); color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
}
#lightbox-modal .modal-close-btn:active, #lightbox-modal .modal-close-btn:hover {
    background: rgba(255, 82, 82, 0.9); border-color: var(--error); transform: scale(1.1);
}
.lightbox-content {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    max-width: 95vw; max-height: 85vh; text-align: center; pointer-events: auto;
}
.lightbox-img {
    max-width: 100%; max-height: 70vh; object-fit: contain;
    border-radius: var(--radius-lg); box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transition: transform 0.3s ease; cursor: zoom-in;
}
.lightbox-img.zoomed {
    transform: scale(1.4); cursor: zoom-out;
}

/* =============================================
   PULL TO REFRESH INDICATOR
   ============================================= */
.ptr-indicator {
    position: fixed;
    top: calc(var(--header-h) + var(--announcement-h) + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 110;
    background: var(--bg-card);
    border: 1px solid var(--border-active);
    box-shadow: var(--shadow-gold);
    border-radius: var(--radius-full);
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold-light);
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
}
.ptr-indicator.visible {
    opacity: 1;
}
.ptr-icon {
    display: inline-block;
    font-size: 1rem;
    transition: transform 0.2s ease;
}
.ptr-indicator.refreshing .ptr-icon {
    animation: ptr-spin 0.8s linear infinite;
}
@keyframes ptr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}



