/*
 * Glitchy Theme v2 — Complete Professional Ecommerce CSS
 * Clean luxury retail design. No effects, no glow, no glitch.
 */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Arabic RTL font override */
body.rtl {
    font-family: var(--font-body-ar);
}
body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4, body.rtl h5, body.rtl h6 {
    font-family: var(--font-heading-ar);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-text);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }

/* =========================================
   Header — Fixed Transparent Overlay
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Logo / Branding */
.site-branding {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.site-branding .custom-logo-link img {
    max-height: 44px;
    width: auto;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Header transparent state: white text */
.site-header .site-title a { color: #fff; }
.site-header.is-scrolled .site-title a { color: var(--color-text); }

.site-subtitle { display: none; }

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-navigation a {
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 0;
    position: relative;
    color: rgba(255,255,255,0.9);
}

.site-header.is-scrolled .main-navigation a {
    color: var(--color-text);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

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

/* Language Switcher */
.lang-switcher {
    margin-right: 0.5rem;
}
body.rtl .lang-switcher {
    margin-right: 0;
    margin-left: 0.5rem;
}

.lang-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.9);
    transition: var(--transition);
}

.site-header.is-scrolled .lang-link {
    color: var(--color-text-secondary);
    border-color: var(--color-border);
}

.lang-link:hover {
    background: rgba(255,255,255,0.15);
}
.site-header.is-scrolled .lang-link:hover {
    background: var(--color-beige);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Cart Icon */
.cart-customlocation {
    position: relative;
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.9);
}

.site-header.is-scrolled .cart-customlocation {
    color: var(--color-text);
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: var(--color-accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

body.rtl .cart-count {
    right: auto;
    left: -8px;
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.icon-bar {
    display: block;
    height: 2px;
    width: 22px;
    background: #fff;
    margin-bottom: 5px;
    transition: var(--transition);
}

.site-header.is-scrolled .icon-bar {
    background: var(--color-text);
}

.icon-bar:last-child { margin-bottom: 0; }

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1.5px solid transparent;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--color-text);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-text);
    color: var(--color-text);
}

.btn-outline:hover {
    background-color: var(--color-text);
    color: #fff;
}

.btn-accent {
    background-color: var(--color-accent);
    color: #fff;
}

.btn-accent:hover {
    background-color: var(--color-accent-hover);
}

/* =========================================
   Hero Section — Full-screen with overlay
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 550px;
    max-height: 900px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.2); /* Clean, uniform slight darkening instead of gradient */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 560px;
    padding: 0;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 2rem;
    line-height: 1.7;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.hero-section .btn-primary {
    background: #fff;
    color: var(--color-text);
    border-color: #fff;
}

.hero-section .btn-primary:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

/* =========================================
   Section System
   ========================================= */
.section {
    padding: 80px 0;
}

.section-sm {
    padding: 56px 0;
}

.bg-beige {
    background-color: var(--color-beige);
}

.bg-sage-light {
    background-color: var(--color-sage-light);
}

.bg-white {
    background-color: var(--color-surface);
}

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

.section-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.section-desc {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* =========================================
   Category Grid
   ========================================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Style WooCommerce product category output */
.woocommerce ul.products li.product-category {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.woocommerce ul.products li.product-category a img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.woocommerce ul.products li.product-category:hover a img {
    transform: scale(1.04);
}

.woocommerce ul.products li.product-category h2,
.woocommerce ul.products li.product-category .woocommerce-loop-category__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    margin: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   Product Grid (WooCommerce)
   ========================================= */
ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.products li.product {
    text-align: center;
    position: relative;
}

ul.products li.product a img,
ul.products li.product img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    transition: box-shadow 0.3s ease;
}

ul.products li.product:hover img {
    box-shadow: var(--shadow-md);
}

ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
    font-family: var(--font-body);
}

ul.products li.product .price {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

ul.products li.product .button {
    display: inline-block;
    padding: 8px 18px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-family: var(--font-body);
}

ul.products li.product .button:hover {
    border-color: var(--color-text);
    background: var(--color-text);
    color: #fff;
}

/* Empty state for product sections */
.woocommerce-info,
.featured-products:empty,
.featured-products .woocommerce > .woocommerce-info {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* =========================================
   Delivery Info Strip
   ========================================= */
.delivery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
}

.delivery-item {
    padding: 24px 16px;
}

.delivery-item svg {
    color: var(--color-sage);
    margin-bottom: 16px;
}

.delivery-item h3 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.delivery-item p {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* =========================================
   Brand Story (About)
   ========================================= */
.brand-story-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.brand-text h2 {
    margin-bottom: 16px;
}

.brand-text p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.8;
}

.brand-image img {
    border-radius: var(--radius-lg);
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
}

/* =========================================
   Testimonials
   ========================================= */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.testimonial-card {
    background: var(--color-surface);
    padding: 32px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    text-align: center;
}

.testimonial-card .quote {
    font-style: italic;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    font-size: 0.92rem;
    line-height: 1.7;
}

.testimonial-card .author {
    color: var(--color-text);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* =========================================
   Instagram Gallery
   ========================================= */
.insta-section {
    padding: 56px 0 0;
}

.insta-heading {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.gallery-grid img:hover {
    opacity: 0.85;
}

/* =========================================
   Newsletter
   ========================================= */
.newsletter-section {
    background: var(--color-beige);
}

.newsletter-form {
    max-width: 480px;
    margin: 24px auto 0;
    display: flex;
    gap: 8px;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* =========================================
   Page Headers (inner pages)
   ========================================= */
.page-header {
    padding: calc(var(--header-height) + 48px) 0 48px;
    background-color: var(--color-beige);
    text-align: center;
}

.page-header .page-title {
    font-size: 2rem;
    margin: 0;
}

.page-content {
    padding: 48px 0;
}

/* =========================================
   Single Product
   ========================================= */
.woocommerce div.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding-top: calc(var(--header-height) + 24px);
}

.woocommerce div.product .product_title {
    font-size: 2rem;
    margin-bottom: 8px;
}

.woocommerce div.product p.price {
    font-size: 1.3rem;
    color: var(--color-accent);
    margin-bottom: 24px;
}

.woocommerce div.product form.cart {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.woocommerce div.product form.cart .button {
    background: var(--color-text);
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
}

.woocommerce div.product form.cart .button:hover {
    background: var(--color-accent);
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 56px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.footer-desc {
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    max-width: 280px;
    line-height: 1.7;
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    color: var(--color-text);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--color-text-secondary);
    font-size: 0.88rem;
}

.footer-col ul li a:hover {
    color: var(--color-text);
}

.footer-col.contact-col p {
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.site-info {
    text-align: center;
    border-top: 1px solid var(--color-border-light);
    padding-top: 20px;
    color: var(--color-text-light);
    font-size: 0.8rem;
}

/* =========================================
   WooCommerce Wrapper (Shop/Cart/Checkout)
   ========================================= */
.wc-wrapper {
    padding: calc(var(--header-height) + 24px) 0 48px;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1024px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    ul.products { grid-template-columns: repeat(3, 1fr); }
    .hero-title { font-size: 2.6rem; }
    .delivery-grid { gap: 20px; }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        padding: 16px 24px;
        box-shadow: var(--shadow-md);
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation a {
        color: var(--color-text) !important;
        padding: 10px 0;
        display: block;
        border-bottom: 1px solid var(--color-border-light);
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .hero-section {
        min-height: 480px;
        max-height: 600px;
    }

    .hero-title { font-size: 2.2rem; }
    .hero-content { padding: 0 16px; }
    .hero-bg::after {
        background: linear-gradient(180deg, rgba(45,41,38,0.6) 0%, rgba(45,41,38,0.25) 100%);
    }

    .section { padding: 56px 0; }

    .category-grid { grid-template-columns: 1fr 1fr; }
    ul.products { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .brand-story-inner { grid-template-columns: 1fr; gap: 32px; }
    .delivery-grid { grid-template-columns: 1fr; gap: 16px; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }

    .woocommerce div.product { grid-template-columns: 1fr; gap: 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }

    .newsletter-form { flex-direction: column; }
}

@media (max-width: 480px) {
    ul.products { grid-template-columns: 1fr 1fr; gap: 12px; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-title { font-size: 1.8rem; }
    .section { padding: 40px 0; }
}
