/* ============================================
   Theme Styles - متجر Update Aden
   البني الحارق والأسود - ألوان المحل
   ============================================ */

:root {
    --primary-color: #5D4037;
    --primary-600: #5D4037;
    --primary-700: #4E342E;
    --primary-800: #3E2723;
    --secondary-color: #fff8f3;
    --surface: #ffffff;
    --text-dark: #3E2723;
    --text-muted: #8D6E63;
    --accent-color: #8D6E63;
    --warning-color: #FF9800;
    --success-color: #5D4037;
    --danger-color: #D84315;
    --hover-color: #4E342E;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --shadow-primary: 0 10px 40px rgba(93,64,55,0.25);
    --shadow-brown: 0 4px 15px rgba(93, 64, 55, 0.25);
    --shadow-brown-lg: 0 10px 30px rgba(93, 64, 55, 0.3);
    --shadow-success: 0 4px 15px rgba(93, 64, 55, 0.25);
    --shadow-danger: 0 4px 15px rgba(216, 67, 21, 0.25);
    --ring: 0 0 0 4px rgba(93, 64, 55, 0.2);
}

/* Performance Optimizations */
* {
    -webkit-tap-highlight-color: transparent;
}

/* General */
body {
    font-family: 'Cairo', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img { 
    max-width: 100%; 
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.product-card img,
.carousel-item img {
    will-change: transform;
    backface-visibility: hidden;
}

/* Main content wrapper */
.container.mt-4 { 
    flex: 1;
    margin-top: 0.5rem !important;
    margin-bottom: 2rem;
}

/* Utilities */
.container-narrow { max-width: 1100px; margin-inline: auto; padding-inline: 16px; }
.rtl { direction: rtl; }
.ring-primary:focus { outline: none; box-shadow: var(--ring); }
.text-muted { color: var(--text-muted) !important; }
.btn-soft { background: #fff3e6; color: var(--primary-700); border: 1px solid rgba(93,64,55,.15); }
.btn-soft:hover { background: #ffe8cc; }

/* RTL Support - دعم اللغة العربية */
[dir="rtl"] .search-form input {
    text-align: right;
}

[dir="rtl"] .product-card .product-info {
    text-align: right;
}

[dir="rtl"] .section-header::after {
    right: auto;
    left: 0;
}

[dir="rtl"] .support-footer .support-links a:hover {
    transform: translateX(5px);
}

[dir="rtl"] .bottom-nav .badge {
    margin-inline-start: 0;
    margin-inline-end: 6px;
}

/* Topbar */
.topbar {
    font-size: 13px;
    font-weight: 500;
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    color: white;
}
.topbar a {
    transition: opacity 0.2s ease, color 0.2s ease;
    color: white;
}
.topbar a:hover {
    opacity: 0.9;
    color: #5D4037;
}

/* Chips (categories) */
.chips { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
    padding: 8px 2px; 
    scrollbar-width: thin; 
}

.chip {
    flex: 0 0 auto; 
    padding: 10px 18px; 
    border-radius: 999px; 
    border: 2px solid #eeeeee;
    background: #fff; 
    color: var(--text-dark); 
    text-decoration: none; 
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chip:hover { 
    background: #fff8f3; 
    color: var(--primary-color); 
    border-color: rgba(93,64,55,.3);
    transition-duration: 0.2s;
}

.chip:focus-visible {
    outline: 2px solid #5D4037;
    outline-offset: 2px;
}

.chip.active { 
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    color: #fff; 
    border-color: transparent; 
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(93,64,55,.3);
}

/* Generic buttons */
.btn-primary {
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    color: #fff; 
    text-decoration: none;
    border: none; 
    padding: 12px 20px; 
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(93,64,55,.25);
}

.btn-primary:hover { 
    background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%);
    box-shadow: 0 6px 25px rgba(93,64,55,.35); 
    transform: translateY(-2px);
    color: white;
    transition-duration: 0.2s;
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary:focus-visible {
    outline: 3px solid #5D4037;
    outline-offset: 2px;
}

/* Header */
.main-header {
    background: var(--surface);
    color: var(--text-dark);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border-bottom: 3px solid #5D4037;
}
.main-header .logo img { height: 50px; }

/* Search form */
.search-form { 
    display: flex; 
    gap: 10px; 
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}
.search-form input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #eeeeee;
    background: #fafafa;
    border-radius: var(--radius-lg);
    transition: all .2s ease;
    font-size: 15px;
}
.search-form input:focus { 
    border-color: #5D4037; 
    box-shadow: var(--ring); 
    outline: none;
    background: #fff;
}
.search-form button {
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(93,64,55,.25);
}

.search-form button:hover { 
    background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(93,64,55,.35);
    transition-duration: 0.2s;
}

.search-form button:active { transform: translateY(0); }

.search-form button:focus-visible {
    outline: 3px solid #5D4037;
    outline-offset: 2px;
}

/* Navbar */
.main-navbar {
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 0.35rem 0;
}
.main-navbar .nav-link {
    color: var(--text-dark);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
}

.main-navbar .nav-link:hover {
    color: #5D4037;
    background: #fff8f3;
    transition-duration: 0.2s;
}

.main-navbar .nav-link:focus-visible {
    outline: 2px solid #5D4037;
    outline-offset: 2px;
}

.main-navbar .nav-link.active { 
    color: white; 
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(93,64,55,.25);
}

/* Hero Carousel */
.carousel {
    margin-bottom: 1.5rem;
}
.carousel-inner {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.carousel-item img {
    max-height: 350px;
    object-fit: cover;
}

/* Product Card */
.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(93,64,55,.2);
    transition-duration: 0.2s;
}
.product-card img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover;
    transition: transform .3s ease;
}
.product-card:hover img {
    transform: scale(1.05);
}
.product-card .product-info { 
    padding: 18px; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
}

.product-card .product-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-dark);
    line-height: 1.5;
}

.product-card .product-price { 
    color: #5D4037; 
    font-size: 20px; 
    font-weight: 900; 
    margin: 0 0 16px;
}

.product-card .btn {
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    color: #fff;
    border: none;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(93,64,55,.2);
}

.product-card .btn:hover { 
    background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%);
    box-shadow: 0 6px 20px rgba(93,64,55,.3); 
    color: #fff;
    transform: translateY(-2px);
    transition-duration: 0.2s;
}

.product-card .btn:active { transform: translateY(0); }

.product-card .card-body { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
}

/* Product price variations */
.price { display: flex; align-items: center; gap: 10px; }
.price-new { color: #5D4037; font-weight: 900; font-size: 18px; }
.price-old { color: var(--text-muted); text-decoration: line-through; font-size: 14px; }

.badge-discount { 
    background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%);
    color: white; 
    padding: 5px 10px; 
    border-radius: 999px; 
    font-size: 12px; 
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(93,64,55,.25);
}

/* Add to cart button */
.btn-add-cart { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    width: 100%;
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    color: #fff; 
    border: none; 
    padding: 12px 14px; 
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none; 
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(93,64,55,.25);
}

.btn-add-cart:hover { 
    background: linear-gradient(135deg, #4E342E 0%, #3E2723 100%);
    box-shadow: 0 6px 20px rgba(93,64,55,.35); 
    color: #fff;
    transform: translateY(-2px);
    transition-duration: 0.2s;
}

.btn-add-cart:active { transform: translateY(0); }

.btn-add-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-add-cart:focus-visible {
    outline: 3px solid #5D4037;
    outline-offset: 2px;
}

/* Quantity stepper */
.qty-stepper { 
    display: inline-flex; 
    align-items: center; 
    border: 2px solid #eeeeee; 
    border-radius: 12px; 
    overflow: hidden; 
}
.qty-stepper button { 
    background: #f5f5f5; 
    border: none; 
    width: 40px; 
    height: 40px; 
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all .2s ease;
}
.qty-stepper button:hover {
    background: #5D4037;
    color: white;
}
.qty-stepper input { 
    width: 50px; 
    height: 40px; 
    text-align: center; 
    border: none; 
    background: #fff; 
    font-weight: 700;
}

/* Categories grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}
.category-card .card {
    background: var(--surface);
    border: 2px solid #eeeeee;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
    height: 100%;
}
.category-card .card:hover { 
    transform: translateY(-6px); 
    box-shadow: var(--shadow-md);
    border-color: rgba(93,64,55,.3);
}
.category-card .card .card-body { padding: 1.25rem; }
.category-card .card .card-body h5 { margin: 12px 0 0; font-weight: 800; font-size: 15px; }

/* Card improvements */
.card {
    border: 2px solid #eeeeee;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
}
.card:hover {
    box-shadow: var(--shadow-md);
}

/* Footer */
footer { 
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    color: white;
    border-top: 4px solid #8D6E63;
}

/* Support footer styles */
.support-footer { 
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    border-top: 4px solid #8D6E63;
    margin-top: auto;
    position: relative;
    color: white;
}

.support-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(93,64,55,0.03)"/></svg>');
    background-size: 100px 100px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.support-footer > * {
    position: relative;
    z-index: 1;
}

.support-footer h2,
.support-footer h3,
.support-footer h4,
.support-footer h5 {
    color: #5D4037 !important;
    font-weight: 800 !important;
}

.support-footer .text-muted {
    color: #bdbdbd !important;
    opacity: 0.9;
}

.support-footer .contact-big { 
    font-size: clamp(28px, 6vw, 48px); 
    font-weight: 900; 
    letter-spacing: 1px;
    background: linear-gradient(135deg, #5D4037, #8D6E63);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.support-footer .contact-big-link { 
    text-decoration: none; 
    color: white; 
    transition: all 0.3s ease;
    display: inline-block;
}

.support-footer .contact-big-link:hover { 
    color: #5D4037;
    transform: scale(1.05);
}

.support-footer .cta-whatsapp-btn {
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    min-width: 220px;
    padding: 16px 32px; 
    border-radius: 50px; 
    border: none;
    color: white;
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    text-decoration: none; 
    font-weight: 800; 
    font-size: 18px; 
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(93,64,55,.4);
}

.support-footer .cta-whatsapp-btn:hover { 
    background: linear-gradient(135deg, #4E342E 0%, #3E2723 100%);
    transform: translateY(-4px);
    box-shadow: 0 10px 35px rgba(93,64,55,.5);
}

.support-footer .hover-primary { 
    color: #bdbdbd !important;
    transition: all 0.3s ease;
    font-size: 28px;
}

.support-footer .hover-primary:hover { 
    color: #5D4037 !important;
    transform: scale(1.2);
}

.support-footer .store-badge { 
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    color: #fff; 
    padding: 12px 20px; 
    border-radius: 14px; 
    font-size: 14px; 
    text-decoration: none; 
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(93,64,55,.3);
    font-weight: 700;
}

.support-footer .store-badge:hover { 
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(93,64,55,.4);
}

.support-footer .support-links li { 
    margin-bottom: 12px; 
    list-style: none; 
}

.support-footer .support-links { 
    padding-left: 0; 
}

.support-footer .support-links a { 
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.support-footer .support-links a:hover { 
    color: #5D4037;
    text-decoration: none;
    transform: translateX(-5px);
}

.support-footer hr {
    border-color: rgba(93,64,55,.2) !important;
    opacity: 0.5;
}

/* Smooth Scrolling */
html { scroll-behavior: smooth; }

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 2rem;
}

.col-span-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }
}

/* Horizontal product scroller */
.h-scroll { 
    overflow-x: auto; 
    padding-bottom: 14px; 
    margin-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(93,64,55,.4) rgba(0,0,0,.05);
}
.h-scroll::-webkit-scrollbar {
    height: 8px;
}
.h-scroll::-webkit-scrollbar-track {
    background: rgba(0,0,0,.05);
    border-radius: 4px;
}
.h-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #5D4037, #4E342E);
    border-radius: 4px;
}
.h-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5D4037, #3E2723);
}
.h-scroll .h-row { 
    display: grid; 
    grid-auto-flow: column; 
    grid-auto-columns: minmax(200px, 1fr); 
    gap: 18px; 
}
.h-scroll .product-card { width: 200px; min-height: 340px; }
.h-scroll .product-card img { height: 170px; }

/* Bottom mobile nav */
.bottom-nav { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    z-index: 1000; 
    background: #fff; 
    border-top: 2px solid #5D4037;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}
.bottom-nav .items { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 4px; 
    padding: 10px; 
    max-width: 780px; 
    margin: 0 auto; 
}
.bottom-nav a { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none; 
    color: var(--text-muted); 
    font-size: 12px; 
    padding: 8px 0; 
    border-radius: 10px;
    font-weight: 600;
    transition: all .2s ease;
}
.bottom-nav a.active, .bottom-nav a:hover { 
    color: #5D4037; 
    background: #fff8f3;
}
.bottom-nav .badge { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    min-width: 20px; 
    height: 20px; 
    border-radius: 999px; 
    background: linear-gradient(135deg, #5D4037, #4E342E);
    color: #fff; 
    font-size: 11px; 
    padding: 0 6px; 
    margin-inline-start: 6px;
    font-weight: 800;
}

/* Section Headers */
.section-header {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    border-radius: 4px;
}

.section-header h2 {
    color: #1A1A1A;
    font-weight: 900;
    font-size: 1.75rem;
}

/* Alert Messages */
.alert-success {
    background: linear-gradient(135deg, rgba(93,64,55,.1) 0%, rgba(78,52,46,.1) 100%);
    border: 2px solid #5D4037;
    border-radius: var(--radius-md);
    color: #3E2723;
    font-weight: 600;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(244,67,54,.1) 0%, rgba(211,47,47,.1) 100%);
    border: 2px solid #F44336;
    border-radius: var(--radius-md);
    color: #C62828;
    font-weight: 600;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255,152,0,.1) 0%, rgba(245,124,0,.1) 100%);
    border: 2px solid #FF9800;
    border-radius: var(--radius-md);
    color: #E65100;
    font-weight: 600;
}

.alert-info {
    background: linear-gradient(135deg, rgba(33,150,243,.1) 0%, rgba(25,118,210,.1) 100%);
    border: 2px solid #2196F3;
    border-radius: var(--radius-md);
    color: #1565C0;
    font-weight: 600;
}

/* Loading States */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
    
    .btn-primary:hover,
    .btn-add-cart:hover {
        transform: none;
    }
    
    .btn-primary:active,
    .btn-add-cart:active {
        transform: scale(0.95);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .search-form { width: 100%; max-width: 100%; }
    .product-card img { height: 150px; }
    .main-navbar .nav-link { padding: 8px 12px; font-size: 14px; }
    .main-header .container { flex-wrap: wrap; gap: 10px; }
    .main-header .search-form { order: 3; width: 100%; margin-top: 10px; }
    .header-icons { gap: 6px !important; }
    .header-icons .btn-soft, .header-icons .btn-primary { padding: 10px 14px !important; font-size: 14px; }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }
    
    .bottom-nav { display: flex; }
}

/* Extra Small Screens (< 375px) */
@media (max-width: 374px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .product-card img {
        height: 180px;
    }
    
    .bottom-nav .items {
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
    }
    
    .bottom-nav a {
        font-size: 10px;
        padding: 6px 0;
    }
    
    .support-footer .contact-big {
        font-size: 24px;
    }
    
    .support-footer .cta-whatsapp-btn {
        min-width: 180px;
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (min-width: 768px) { 
    .bottom-nav { display: none; } 
}

/* Prevent bottom-nav overlap on mobile */
@supports (padding: max(0px)) {
    @media (max-width: 767px) {
        body { padding-bottom: max(80px, env(safe-area-inset-bottom)); }
    }
}

/* Print Styles */
@media print {
    .topbar,
    .main-header,
    .main-navbar,
    .bottom-nav,
    .support-footer,
    .carousel,
    .btn,
    .search-form {
        display: none !important;
    }
    
    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
    }
}

/* ===== تحويل جميع الأزرار والعناصر الخضراء إلى بني ===== */
.btn-success,
button.btn-success,
a.btn-success {
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%) !important;
    border-color: #5D4037 !important;
    color: white !important;
}

.btn-success:hover,
button.btn-success:hover,
a.btn-success:hover {
    background: linear-gradient(135deg, #4E342E 0%, #3E2723 100%) !important;
    border-color: #4E342E !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(93, 64, 55, 0.4) !important;
}

.bg-success {
    background-color: #5D4037 !important;
}

.text-success {
    color: #5D4037 !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%) !important;
    color: white !important;
}

.border-success {
    border-color: #5D4037 !important;
}

.alert-success {
    background-color: #f5ebe8 !important;
    border-color: #8D6E63 !important;
    color: #3E2723 !important;
}
