/*
Theme Name: Tunisian Ecommerce Theme
Theme URI: https://votresite.com
Author: Votre Nom
Author URI: https://votresite.com
Description: Thème moderne pour e-commerce en Tunisie avec paiement à la livraison, devise TND, et design responsive
Version: 1.0.0
License: GPL v2 or later
Text Domain: tunisia-ecommerce
Domain Path: /languages
WC requires at least: 6.0
WC tested up to: 8.0
*/

/* Styles principaux */
:root {
    --primary-color: #e31e24;
    --secondary-color: #00a651;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    flex-wrap: wrap;
}

.site-logo img {
    max-height: 50px;
}

.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.header-search form {
    display: flex;
}

.header-search input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 50px 0 0 50px;
    outline: none;
}

.header-search button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
}

.header-cart {
    position: relative;
}

.cart-icon {
    font-size: 24px;
    color: var(--dark-color);
    text-decoration: none;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.main-nav {
    background: var(--dark-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 0;
}

.main-nav li a {
    color: white;
    text-decoration: none;
    padding: 15px 0;
    display: block;
    transition: var(--transition);
}

.main-nav li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 50px;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.product-image {
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
    text-decoration: none;
    display: block;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.product-price del {
    font-size: 14px;
    color: var(--gray-color);
    margin-right: 10px;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
}

.add-to-cart:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Services Section */
.services-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 60px 0;
    padding: 40px;
    background: white;
    border-radius: 20px;
}

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

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
    color: white;
}

/* Footer */
.site-footer {
    background: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

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

.footer-section h3 {
    margin-bottom: 20px;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

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

/* Responsive */
@media (max-width: 768px) {
    .header-main {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-search {
        max-width: 100%;
        margin: 10px 0;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 0;
    }
    
    .main-nav li a {
        padding: 10px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

/* ============================================
   PALETTES DE COULEURS TUNISIENNES
   ============================================ */

/* Palette 1: Tunisie Moderne */
.palette-tunisia-modern {
    --primary-color: #E17055;
    --secondary-color: #FDCB6E;
    --accent-color: #E17055;
}

/* Palette 2: Élégant Minimal */
.palette-elegant-minimal {
    --primary-color: #2C3E50;
    --secondary-color: #ECF0F1;
    --accent-color: #E74C3C;
}

/* Palette 3: Frais & Naturel */
.palette-fresh-nature {
    --primary-color: #27AE60;
    --secondary-color: #F39C12;
    --accent-color: #27AE60;
}

/* Palette 4: Luxury Gold */
.palette-luxury {
    --primary-color: #1A1A2E;
    --secondary-color: #E94560;
    --accent-color: #E94560;
}

/* Palette 5: Bleu Méditerranée */
.palette-mediterranean {
    --primary-color: #0984E3;
    --secondary-color: #74B9FF;
    --accent-color: #00CEC9;
}

/* Palette 6: Terre Tunisienne */
.palette-terre-tunisie {
    --primary-color: #D63031;
    --secondary-color: #FDCB6E;
    --accent-color: #D63031;
}
/* ==================== AMÉLIORATIONS MOBILE ==================== */

/* Amélioration du touch pour mobile */
@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }
    
    /* Boutons plus grands pour mobile */
    button, 
    .add-to-cart,
    .btn-primary,
    .qty-btn {
        min-height: 48px;
        cursor: pointer;
    }
    
    /* Espacement des liens pour faciliter le clic */
    .mobile-menu li a {
        padding: 18px 0;
        font-size: 16px;
    }
    
    /* Amélioration scroll */
    .mobile-menu-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Animation du bouton hamburger */
.menu-toggle-modern {
    transition: all 0.3s;
}

.menu-toggle-modern:hover {
    transform: scale(1.05);
}

/* Style pour l'overlay */
.mobile-menu-overlay {
    backdrop-filter: blur(5px);
}

/* Animation d'entrée des icônes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-contact a,
.mobile-social a {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.mobile-phone { animation-delay: 0.2s; }
.mobile-whatsapp { animation-delay: 0.3s; }
.mobile-social a:nth-child(1) { animation-delay: 0.4s; }
.mobile-social a:nth-child(2) { animation-delay: 0.5s; }
.mobile-social a:nth-child(3) { animation-delay: 0.6s; }

/* Palette ZiddoShop - Noir & Orange */
:root {
    --ziddo-black: #1A1A1A;
    --ziddo-dark: #2D2D2D;
    --ziddo-orange: #F39C12;
    --ziddo-orange-light: #F5B041;
    --ziddo-orange-dark: #E67E22;
    --ziddo-white: #FFFFFF;
    --ziddo-gray: #7F8C8D;
    --ziddo-light-gray: #ECF0F1;
}

/* ==================== ZIDDOSHOP GLOBAL STYLES ==================== */

/* Boutons */
.ziddo-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--ziddo-orange);
    color: var(--ziddo-black);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.ziddo-btn:hover {
    background: var(--ziddo-orange-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243,156,18,0.3);
}

.ziddo-btn-outline {
    background: transparent;
    border: 2px solid var(--ziddo-orange);
    color: var(--ziddo-orange);
}

.ziddo-btn-outline:hover {
    background: var(--ziddo-orange);
    color: var(--ziddo-black);
}

/* Cards produit */
.ziddo-product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    position: relative;
}

.ziddo-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(243,156,18,0.15);
}

.ziddo-product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--ziddo-orange);
    color: var(--ziddo-black);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.ziddo-product-image {
    height: 280px;
    overflow: hidden;
}

.ziddo-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s;
}

.ziddo-product-card:hover .ziddo-product-image img {
    transform: scale(1.05);
}

.ziddo-product-info {
    padding: 20px;
}

.ziddo-product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--ziddo-black);
    text-decoration: none;
    display: block;
}

.ziddo-product-title:hover {
    color: var(--ziddo-orange);
}

.ziddo-product-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--ziddo-orange);
    margin: 10px 0;
}

.ziddo-product-price del {
    font-size: 14px;
    color: var(--ziddo-gray);
    margin-right: 8px;
}

/* Footer ZiddoShop */
.ziddo-footer {
    background: var(--ziddo-black);
    color: var(--ziddo-white);
    padding: 60px 0 20px;
    margin-top: 60px;
}

.ziddo-footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.ziddo-footer-col h3 {
    color: var(--ziddo-orange);
    margin-bottom: 20px;
    font-size: 18px;
}

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

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

.ziddo-footer-col ul li a {
    color: var(--ziddo-gray);
    text-decoration: none;
    transition: all 0.3s;
}

.ziddo-footer-col ul li a:hover {
    color: var(--ziddo-orange);
    padding-left: 5px;
}

.ziddo-footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(243,156,18,0.2);
    color: var(--ziddo-gray);
    font-size: 14px;
}

/* Hero Section ZiddoShop */
.ziddo-hero {
    background: linear-gradient(135deg, var(--ziddo-black), var(--ziddo-dark));
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ziddo-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(243,156,18,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.ziddo-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.ziddo-hero h1 span {
    color: var(--ziddo-orange);
}

.ziddo-hero p {
    font-size: 18px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    color: var(--ziddo-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .ziddo-hero h1 {
        font-size: 32px;
    }
    
    .ziddo-footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ==================== IMAGES PRODUITS UNIQUEMENT ==================== */

/* 1. Conteneur des images produits - format carré */
.woocommerce-loop-product__link img,
.wp-post-image,
.product-image img,
.products-grid .product-card img,
.product-card img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
}

/* 2. Version mobile - 2 produits par ligne + image plus petite */
@media (max-width: 768px) {
    .products-grid .product-card img,
    .product-card img,
    .woocommerce-loop-product__link img {
        height: 160px !important;
    }
}

@media (max-width: 480px) {
    .products-grid .product-card img,
    .product-card img,
    .woocommerce-loop-product__link img {
        height: 140px !important;
    }
}

/* 3. Protection des icônes boutons - RESTENT NORMALES */
button img,
.add-to-cart img,
.btn img,
.add_to_cart_button img,
.ajax_add_to_cart img {
    width: auto !important;
    height: auto !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: none !important;
}

/* 4. Galerie produit page single */
.woocommerce-product-gallery__image img,
.product-gallery .main-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 500px !important;
    object-fit: contain !important;
}
/* ==================== 2 PRODUITS PAR LIGNE SUR MOBILE ==================== */

/* Pour la page d'accueil et boutique */
@media (max-width: 768px) {
    /* Grid produits */
    .products-grid,
    .woocommerce ul.products,
    .best-sellers .products-grid,
    .all-products .products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    /* Chaque carte produit */
    .product-card,
    .woocommerce li.product {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        float: none !important;
        clear: none !important;
    }
    
    /* Éviter les marges indésirables */
    .woocommerce .products ul,
    .woocommerce ul.products {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Pour les très petits écrans (moins de 400px) */
@media (max-width: 480px) {
    .products-grid,
    .woocommerce ul.products {
        gap: 10px !important;
    }
}