/* =========================================
   UAE E-Commerce Theme - Main Styles
   ========================================= */

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--wp--preset--font-family--primary, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: var(--body-font-size, 16px);
    line-height: 1.6;
    color: var(--theme-text, #333333);
    background-color: var(--theme-background, #ffffff);
    overflow-x: hidden;
}

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

a {
    color: var(--theme-primary, #d4af37);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--theme-secondary, #1a1a1a);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width, 1200px);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Site Layout */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding: 2rem 0;
}

/* Announcement Bar */
.announcement-bar {
    background-color: var(--theme-primary, #d4af37);
    color: #ffffff;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Header */
.site-header {
    background-color: var(--theme-background, #ffffff);
    border-bottom: 1px solid var(--theme-border, #e0e0e0);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.site-branding {
    flex-shrink: 0;
}

.custom-logo {
    max-height: 50px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--theme-heading, #1a1a1a);
}

/* Navigation */
.main-navigation {
    flex-grow: 1;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--theme-text, #333);
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}

.main-navigation a:hover {
    color: var(--theme-primary, #d4af37);
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--theme-background, #ffffff);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius, 8px);
    padding: 0.5rem 0;
    flex-direction: column;
    gap: 0;
    z-index: 100;
}

.main-navigation .menu-item-has-children {
    position: relative;
}

.main-navigation .menu-item-has-children:hover > .sub-menu {
    display: flex;
}

.main-navigation .sub-menu a {
    padding: 0.75rem 1.5rem;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-search,
.account-icon,
.wishlist-icon,
.cart-icon,
.whatsapp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    background: none;
    border: none;
    color: var(--theme-text, #333);
    transition: all 0.3s ease;
}

.header-search:hover,
.account-icon:hover,
.wishlist-icon:hover,
.cart-icon:hover,
.whatsapp-icon:hover {
    color: var(--theme-primary, #d4af37);
}

.cart-count,
.wishlist-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--theme-primary, #d4af37);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-form {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--theme-background, #ffffff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius, 8px);
    min-width: 300px;
    z-index: 100;
}

.header-search-form.active {
    display: block;
}

.language-switcher select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--theme-border, #e0e0e0);
    border-radius: var(--border-radius, 8px);
    background: var(--theme-background, #ffffff);
    font-size: 0.875rem;
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--theme-text, #333);
    cursor: pointer;
}

/* Footer */
.site-footer {
    background-color: var(--theme-secondary, #1a1a1a);
    color: #ffffff;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3,
.footer-column .widget-title {
    color: var(--theme-primary, #d4af37);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: #cccccc;
}

.footer-column a:hover {
    color: var(--theme-primary, #d4af37);
}

.payment-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-icons img {
    height: 30px;
    width: auto;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    font-size: 0.875rem;
    color: #cccccc;
    margin-bottom: 0.5rem;
}

.footer-legal {
    font-size: 0.813rem;
    color: #999999;
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--theme-primary, #d4af37);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.whatsapp-float.visible {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--theme-primary, #d4af37);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--theme-secondary, #1a1a1a);
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius, 8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

/* Loader */
.uae-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.uae-loader.show {
    opacity: 1;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--theme-primary, #d4af37);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.uae-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.uae-modal.show {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: var(--border-radius, 8px);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #000;
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--theme-background, #ffffff);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    
    .main-navigation a {
        padding: 0.75rem 1rem;
    }
    
    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        display: none;
        padding-left: 1rem;
    }
    
    .main-navigation .menu-item-has-children.focus > .sub-menu {
        display: flex;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .whatsapp-float {
        bottom: 80px;
    }
}

/* Screen Reader Only */
.screen-reader-text,
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    background: var(--theme-primary, #d4af37);
    color: #ffffff;
    padding: 1rem;
    z-index: 10000;
    width: auto;
    height: auto;
    clip: auto;
}
/* ===== Qahwa brand chrome (header / footer) ===== */
:root {
    --qahwa-espresso: #2c1810;
    --qahwa-cream: #f5efe6;
    --qahwa-gold: #c4a35a;
    --qahwa-milk: #fffaf3;
}

.announcement-bar {
    background: var(--qahwa-espresso);
    color: var(--qahwa-cream);
}
.announcement-bar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.announcement-bar__whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--qahwa-gold);
    font-weight: 600;
    font-size: 0.8125rem;
}
.announcement-bar__whatsapp:hover { color: #fff; }

.site-header {
    background: var(--qahwa-milk);
    border-bottom: 1px solid rgba(44, 24, 16, 0.08);
}
.site-logo-text {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    text-decoration: none !important;
}
.site-logo-text__en {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--qahwa-espresso);
    text-transform: uppercase;
}
.site-logo-text__ar {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--qahwa-gold);
}

.main-navigation .menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
}
.main-navigation .menu a {
    color: var(--qahwa-espresso);
    font-weight: 600;
    font-size: 0.9375rem;
}
.main-navigation .menu a:hover {
    color: var(--qahwa-gold);
}

.language-switcher--pills {
    display: inline-flex;
    border: 1px solid rgba(44, 24, 16, 0.15);
    border-radius: 999px;
    overflow: hidden;
}
.lang-pill {
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--qahwa-espresso);
    background: transparent;
}
.lang-pill.is-active,
.lang-pill:hover {
    background: var(--qahwa-espresso);
    color: var(--qahwa-cream);
}

.header-search-form {
    display: none;
}
.header-search-form.active {
    display: block;
}

.site-footer {
    background: var(--qahwa-espresso);
    color: var(--qahwa-cream);
    padding: 3.5rem 0 1.5rem;
}
.site-footer a { color: var(--qahwa-cream); opacity: 0.85; }
.site-footer a:hover { color: var(--qahwa-gold); opacity: 1; }
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-column .widget-title,
.footer-column h3 {
    color: var(--qahwa-gold);
    font-size: 1rem;
    margin: 0 0 1rem;
}
.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-column li { margin-bottom: 0.5rem; }
.footer-brand-ar { color: var(--qahwa-gold); margin-top: 0.75rem; }
.payment-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(245, 239, 230, 0.15);
    border-bottom: 1px solid rgba(245, 239, 230, 0.15);
    margin-bottom: 1.25rem;
}
.payment-icons img { height: 24px; width: auto; filter: brightness(0) invert(1); opacity: 0.8; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    opacity: 0.9;
}
.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 999;
}

@media (max-width: 900px) {
    .footer-widgets { grid-template-columns: repeat(2, 1fr); }
    .main-navigation { display: none; }
    .main-navigation.is-open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--qahwa-milk); padding: 1rem; border-bottom: 1px solid #eee; }
    .main-navigation.is-open .menu { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
    .footer-widgets { grid-template-columns: 1fr; }
}


/* ===== Homepage sections — Qahwa brand ===== */
.uae-hero-section {
    position: relative;
    min-height: var(--hero-min-height, 520px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c1810 0%, #4a2c1a 55%, #c4a35a 140%);
    color: #f5efe6;
    text-align: center;
    overflow: hidden;
}
.uae-hero-section .hero-background {
    position: absolute; inset: 0;
    background-image: var(--hero-bg-desktop);
    background-size: cover;
    background-position: center;
    opacity: 0.35;
}
.uae-hero-section .hero-overlay {
    position: absolute; inset: 0;
    background: var(--hero-overlay-color, #000);
    opacity: var(--hero-overlay-opacity, 0.25);
}
.uae-hero-section .hero-content { position: relative; z-index: 2; padding: 4rem 1rem; }
.uae-hero-section .hero-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 0 0 1rem;
    color: #fffaf3;
    font-weight: 800;
}
.uae-hero-section .hero-description {
    font-size: 1.125rem;
    max-width: 640px;
    margin: 0 auto 1.75rem;
    opacity: 0.95;
}
.uae-hero-section .hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.uae-hero-section .button-primary {
    background: var(--qahwa-gold, #c4a35a);
    color: #2c1810 !important;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    font-weight: 700;
}
.uae-hero-section .button-secondary {
    background: transparent;
    color: #fffaf3 !important;
    border: 2px solid rgba(255,250,243,0.7);
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    font-weight: 700;
}

.section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-heading {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--qahwa-espresso, #2c1810);
    margin: 0 0 0.5rem;
}
.section-description { color: #6b5344; margin: 0 auto; max-width: 560px; }

.uae-features-section { background: var(--qahwa-cream, #f5efe6); }
.features-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns-desktop, 4), 1fr);
    gap: 1.5rem;
}
.feature-item {
    background: #fffaf3;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(44,24,16,0.06);
}
.feature-icon { color: var(--qahwa-gold, #c4a35a); margin-bottom: 0.75rem; }
.feature-title { margin: 0 0 0.35rem; color: var(--qahwa-espresso, #2c1810); }
.feature-description { margin: 0; color: #6b5344; font-size: 0.9rem; }

.uae-banner-section, .uae-banner, [class*="uae-banner"] {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fffaf3;
    background: linear-gradient(120deg, #2c1810, #6b4423 60%, #c4a35a);
    border-radius: 0;
    margin: 0;
    padding: 3.5rem 1.5rem;
}
.uae-banner--fallback { /* ensured */ }
.uae-banner-section .banner-heading, .uae-banner .banner-heading, .uae-banner-section h2 {
    color: #fffaf3;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 0 0.75rem;
}
.uae-banner-section .button, .uae-banner .button {
    display: inline-block;
    margin-top: 1rem;
    background: #fffaf3;
    color: #2c1810 !important;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
}

.uae-products-section ul.products,
.uae-products-section .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.uae-categories-section .categories-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns-desktop, 4), 1fr);
    gap: 1.25rem;
}
.uae-categories-section .category-item {
    background: var(--qahwa-cream, #f5efe6);
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    padding: 1.25rem;
    border: 1px solid rgba(44,24,16,0.06);
}

.uae-testimonials-section { background: var(--qahwa-cream, #f5efe6); }
.uae-testimonials-section .testimonials-grid,
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.testimonial-item, .uae-testimonials-section .testimonial {
    background: #fffaf3;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(44,24,16,0.06);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns-desktop, 6), 1fr);
    gap: 1rem;
}
.brand-item {
    background: #fffaf3;
    border: 1px solid rgba(44,24,16,0.08);
    border-radius: 12px;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.brand-name-fallback {
    font-weight: 700;
    color: var(--qahwa-espresso, #2c1810);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.uae-newsletter-section, .uae-newsletter, section.uae-newsletter-section {
    background: var(--qahwa-espresso, #2c1810);
    color: #f5efe6;
    text-align: center;
    padding: 4rem 1.5rem;
    border-radius: 0;
}
.uae-newsletter-section .section-heading,
.uae-newsletter .section-heading,
.uae-newsletter-section h2 {
    color: #fffaf3 !important;
}
.uae-newsletter-section .section-description,
.uae-newsletter p { color: rgba(245,239,230,0.85); }
.uae-newsletter-section form,
.uae-newsletter form {
    display: flex;
    gap: 0.5rem;
    max-width: 480px;
    margin: 1.5rem auto 0;
    flex-wrap: wrap;
    justify-content: center;
}
.uae-newsletter-section input[type="email"],
.uae-newsletter input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    border: none;
}
.uae-newsletter-section button,
.uae-newsletter button,
.uae-newsletter input[type="submit"] {
    background: var(--qahwa-gold, #c4a35a);
    color: #2c1810;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
}

.site-main--front { padding: 0; }
.site-main--front .entry-content > * { margin: 0; }

@media (max-width: 900px) {
    .features-grid, .uae-products-section ul.products, .uae-testimonials-section .testimonials-grid, .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .brands-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .features-grid, .uae-products-section ul.products, .uae-testimonials-section .testimonials-grid, .testimonials-grid,
    .uae-categories-section .categories-grid, .brands-grid {
        grid-template-columns: 1fr;
    }
}

.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { max-height: 52px; width: auto; border-radius: 10px; }
.site-main--shop { padding: 2rem 0 3rem; }
.site-main--shop .woocommerce-products-header__title { color: var(--qahwa-espresso, #2c1810); }
