/* =========================================
   PRIMARY CSS (Critical Path)
   Version: GAMOS 3.2 Final
========================================= */

:root {
    --color-primary: #D4AF37;
    --color-text-dark: #1A1A1A;
    --color-bg-light: #FDFDFD;
    --color-border: #EAEAEA;
    --seasonal-accent: #162822;
    --font-primary: 'Montserrat', sans-serif; 
    --container-width: 1280px;
    --transition-fast: 0.2s ease-in-out;
}

/* --- Base Reset --- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-primary); color: var(--color-text-dark); background-color: var(--color-bg-light); line-height: 1.6; }

/* --- Utilities --- */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 15px; }
.flex-between { display: flex; justify-content: space-between; }
.align-center { display: flex; align-items: center; }

/* --- Header Topbar --- */
.header-topbar { background-color: var(--color-text-dark); color: #fff; font-size: 0.75rem; padding: 6px 0; }
.header-topbar a { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 5px; }

/* --- Main Header Layout --- */
.site-header { 
    background-color: var(--color-bg-light); 
    border-bottom: 1px solid var(--color-border); 
    position: sticky; 
    top: 0; 
    z-index: 999; 
    /* Smooth Transition για το Smart Header */
    transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1); 
}

/* Η κλάση που κρύβει το header στο scroll down */
.site-header.is-hidden {
    transform: translateY(-100%);
}

.header-main { padding: 15px 0; }
.site-branding img { max-width: 160px; height: auto; display: block; }
@media (max-width:574px) { .site-branding img { max-width: 130px!important; } }

/* --- Header Actions --- */
.header-actions { display: flex; align-items: center; gap: 15px; }
.action-btn { background: none; border: none; color: var(--color-text-dark); position: relative; padding: 5px; cursor: pointer; display: flex; align-items: center; transition: color var(--transition-fast);}
.action-btn:hover { color: var(--color-primary); }
.cart-link .cart-count, 
.wishlist-link .wishlist-count { 
    position: absolute; top: -5px; right: -8px; background: var(--color-primary); color: #fff; font-size: 0.65rem; font-weight: bold; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; 
}

/* Προαιρετικά: Να κρύβεται το μπαλονάκι αν είναι 0 (θα μας φανεί χρήσιμο μετά με τη Javascript) */
.wishlist-count.is-empty {
    display: none;
}
/* =========================================
   MOBILE MENU & OVERLAY (Fixed Ghost Clicks)
========================================= */
.mobile-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.5); z-index: 998; 
    opacity: 0; 
    visibility: hidden; /* Κρίσιμο: Να μην φαίνεται */
    pointer-events: none; /* Κρίσιμο: Να περνάνε τα κλικ από κάτω */
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}
.mobile-overlay.is-active { 
    opacity: 1; 
    visibility: visible; 
    pointer-events: auto; /* Ενεργοποίηση κλικ μόνο όταν ανοίξει */
}

.main-navigation { 
    position: fixed; top: 0; left: -100%; width: 320px; max-width: 85%; height: 100vh; 
    background: var(--color-bg-light); z-index: 1000; 
    display: flex; flex-direction: column; 
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.main-navigation.is-active { left: 0; }

.menu-toggle { background: none; border: none; padding: 10px; display: flex; z-index: 2; cursor: pointer;}
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--color-border); background: #f9f9f9; margin-bottom: 10px; }
.mobile-menu-title { font-weight: 600; font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase;}
.mobile-menu-close { background: none; border: none; padding: 5px; cursor: pointer; display: flex;}

#primary-menu { list-style: none; margin: 0; padding: 0 20px 40px; overflow-y: auto; flex-grow: 1; }
#primary-menu > li > a { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; font-weight: 500; color: var(--color-text-dark); text-decoration: none; border-bottom: 1px solid var(--color-border); }

.sub-menu { display: none; padding-left: 15px; list-style: none; }
.sub-menu.is-open { display: block; }
.sub-menu li a { display: block; padding: 12px 0; font-size: 0.9rem; color: #555; text-decoration: none;}

@media (min-width: 992px) {
    .menu-toggle, .mobile-menu-header, .mobile-overlay { display: none !important; } 
    .site-branding img { max-width: 195px; }
    .main-navigation { position: static; width: auto; height: auto; padding: 0; overflow: visible; display: block; background: transparent;}
    #primary-menu { display: flex; gap: 30px; padding: 0; overflow: visible; }
    #primary-menu > li { position: relative; } 
    #primary-menu > li > a { padding: 10px 0; border: none; font-size: 0.85rem; text-transform: uppercase; }
    .sub-menu { 
        display: block; position: absolute; top: 100%; left: 0; min-width: 220px; 
        background: #fff; padding: 15px 0; opacity: 0; visibility: hidden; pointer-events: none; 
        box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 1px solid #f0f0f0;
    }
    .menu-item-has-children:hover .sub-menu { opacity: 1; visibility: visible; pointer-events: auto; }
}

/* =========================================
   HERO SECTION
========================================= */
.hero-section {
    position: relative; width: 100%; height: 85vh; min-height: 500px;
    background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.45); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 850px; padding: 0 20px; color: #fff; animation: fadeInDown 0.8s ease-out; }
.hero-title { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 600; margin-bottom: 20px; line-height: 1.2; text-shadow: 2px 2px 8px rgba(0,0,0,0.4); }
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.2rem); font-weight: 300; margin-bottom: 40px; text-shadow: 1px 1px 5px rgba(0,0,0,0.5); color: #eee; }

.btn-primary {
    display: inline-block; background: transparent; color: #fff; text-decoration: none; padding: 16px 35px;
    font-size: 0.95rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1.5px; border: 2px solid #fff; transition: all var(--transition-fast);
}
.btn-primary:hover { background-color: var(--color-primary); border-color: var(--color-primary); color: #fff; }

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   SEARCH OVERLAY (Fixed Ghost Clicks)
========================================= */
#search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(253, 253, 253, 0.98); z-index: 100000;
    display: flex; /* Χρησιμοποιούμε flex για κεντράρισμα */
    align-items: center; justify-content: center;
    backdrop-filter: blur(8px);
    /* Κρύψιμο και Απενεργοποίηση Κλικ όταν είναι κλειστό */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

#search-overlay.is-active { 
    opacity: 1; 
    visibility: visible; 
    pointer-events: auto; /* Επαναφορά κλικ όταν ανοίξει */
}

.search-close-btn { position: absolute; top: 30px; right: 40px; background: none; border: none; cursor: pointer; color: var(--color-text-dark); transition: transform var(--transition-fast); }
.search-close-btn:hover { transform: scale(1.1) rotate(90deg); color: var(--color-primary); }

.search-overlay-content { width: 100%; max-width: 800px; padding: 0 20px; text-align: center; }
.search-input-wrapper { display: flex; align-items: center; border-bottom: 2px solid var(--color-text-dark); padding-bottom: 10px; margin-bottom: 30px; }
.search-field { width: 100%; border: none; background: transparent; font-size: 2.5rem; color: var(--color-text-dark); outline: none; font-family: var(--font-primary); font-weight: 300; }
.search-field::placeholder { color: #ccc; }
.search-submit { background: none; border: none; cursor: pointer; color: var(--color-text-dark); transition: color var(--transition-fast); }
.search-submit:hover { color: var(--color-primary); }

.search-suggestions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; font-size: 0.9rem; }
.suggestions-title { color: #888; margin-right: 10px; }
.search-suggestions a { color: var(--color-text-dark); text-decoration: none; border: 1px solid var(--color-border); padding: 8px 18px; border-radius: 30px; transition: all var(--transition-fast); background: #fff;}
.search-suggestions a:hover { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }

@media (max-width: 768px) {
    .search-field { font-size: 1.5rem; }
    .search-close-btn { top: 20px; right: 20px; }
    .search-suggestions { flex-direction: column; gap: 10px; }
}

/* =========================================
   NATIVE SCROLL CAROUSEL / SLIDERS
========================================= */
.slider-container-wrapper { position: relative; }

/* Το κλειδί για ομαλό scroll στα κινητά */
.product-native-slider {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory; /* Αναγκάζει την κάρτα να "κουμπώσει" */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Απαραίτητο για iOS */
    gap: 15px;
    padding: 10px 5px 30px 5px;
    margin-top: 20px;
    width: 100%;
}

/* Κρύβει την μπάρα κύλισης */
.product-native-slider::-webkit-scrollbar { display: none; }
.product-native-slider { -ms-overflow-style: none; scrollbar-width: none; }

/* Όταν ο χρήστης κάνει κλικ και σέρνει (Desktop) */
.product-native-slider.is-dragging { 
    cursor: grabbing !important; 
    scroll-snap-type: none; /* Απενεργοποίηση snap στο drag για να μην "κλωτσάει" */
    scroll-behavior: auto; /* Απενεργοποίηση smooth για άμεση απόκριση στο ποντίκι */
}

.product-native-slider img, .product-native-slider a {
    -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none;
    user-select: none; pointer-events: auto;
}

/* Κάρτες Slider: Σταθερό πλάτος για να δουλέψει το flex */
.product-card {
    flex: 0 0 280px; 
    scroll-snap-align: start;
    display: flex; flex-direction: column;
}

@media (max-width: 576px) {
    .product-card { flex: 0 0 220px; } /* Μικρότερες κάρτες στα κινητά για να φαίνεται η επόμενη */
    .product-native-slider { padding-left: 15px; padding-right: 15px; }
}
@media (min-width: 768px) { .product-card { flex: 0 0 calc(50% - 10px); } }
@media (min-width: 992px) { .product-card { flex: 0 0 calc(25% - 15px); } }

/* Βελάκια */
.slider-arrow {
    position: absolute; top: 40%; transform: translateY(-50%);
    width: 48px; height: 48px; background: #fff; border: 1px solid var(--color-border);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: all 0.3s ease; color: var(--color-text-dark);
}
.slider-arrow:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); transform: translateY(-50%) scale(1.05); }
.slider-prev { left: -24px; }
.slider-next { right: -24px; }

@media (max-width: 991px) { .slider-arrow { display: none; } } /* Στα κινητά χρησιμοποιούμε μόνο touch */

/* Κάρτα Design (Κοινό) */
.product-image-wrapper { position: relative; overflow: hidden; border-radius: 8px; margin-bottom: 15px; background: #fdfdfd; aspect-ratio: 1/1; }
.product-image-wrapper img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-image-wrapper img { transform: scale(1.05); }

.quick-add-btn {
    position: absolute; bottom: 15px; right: 15px; width: 40px; height: 40px; background: #fff; color: var(--color-text-dark); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(0,0,0,0.1); opacity: 0; transform: translateY(10px); transition: all 0.3s ease;
}
.product-card:hover .quick-add-btn { opacity: 1; transform: translateY(0); }
.quick-add-btn:hover { background: var(--color-primary); color: #fff; }

.product-info { text-align: left; }
.product-cat { display: block; font-size: 0.75rem; color: #888; text-transform: uppercase; margin-bottom: 5px; }
.product-cat a {text-decoration: none;color: #888;}
.product-title { font-size: 1.1rem; font-weight: 500; margin: 0 0 8px 0; }
.product-title a { color: var(--color-text-dark); text-decoration: none; transition: color var(--transition-fast); }
.product-title a:hover { color: var(--color-primary); }
.product-price { font-weight: 600; text-align: center; font-size: 1.05rem; color: var(--color-text-dark); }
.product-price del { color: #aaa; font-weight: 400; font-size: 0.9rem; margin-right: 5px; }
.product-price ins { text-decoration: none; color: #b12704; }

/* =========================================
   FULL WIDTH ADD TO CART BUTTON
========================================= */
.product-info { 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; /* Κάνει το info να πιάνει όλο τον διαθέσιμο χώρο */
}

.product-info .product-price {
    margin-bottom: 15px; /* Δίνει λίγο "αέρα" πριν το κουμπί */
}

.btn-add-to-cart-full {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--color-text-dark); /* Ή var(--color-primary) αν το θες χρυσό */
    border-color: var(--color-text-dark);
    color: #fff;	
    padding: 10px 15px;
    margin-top: auto; /* Σπρώχνει το κουμπί ΠΑΝΤΑ στο κάτω μέρος της κάρτας */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.btn-add-to-cart-full:hover {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-dark);
}

/* Loading state του WooCommerce (όταν πατιέται το κουμπί) */
.btn-add-to-cart-full.loading {
    opacity: 0.7;
    pointer-events: none;
}

.product_meta .posted_in a, 
.product_meta .tagged_as a {
    display: block; /* Αυτό αναγκάζει το κάθε link να αλλάζει γραμμή */
    margin-top: 4px; /* Δίνει ένα μικρό κενό ανάμεσά τους */
}

/* =========================================
   STANDARD PAGES (page.php)
========================================= */
.page-header {
    position: relative; padding: 60px 0; text-align: center;
    background-color: var(--color-bg-light); border-bottom: 1px solid var(--color-border);
    background-size: cover; background-position: center;
}
.page-header.has-bg { padding: 120px 0; border-bottom: none; }
.page-header-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.55); z-index: 1; }
.page-header-content { position: relative; z-index: 2; }
.page-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; margin: 0 0 10px 0; color: var(--color-text-dark); }
.page-subtitle { font-size: 1.1rem; font-weight: 300; max-width: 700px; margin: 0 auto; color: #666; }
.page-header.has-bg .page-title, .page-header.has-bg .page-subtitle { color: #fff; text-shadow: 1px 1px 8px rgba(0,0,0,0.5); }
.page-content-section { padding: 60px 0 100px; background-color: #fff; }
.entry-content { margin: 0 auto; font-size: 1.05rem; line-height: 1.8; color: #444; }
.woocommerce .entry-content { max-width: 100%; }
.entry-content h2, .entry-content h3 { color: var(--color-text-dark); margin-top: 40px; margin-bottom: 20px; }
.entry-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* =========================================
   FIX: CART FLASHING & GHOST CLICKS
========================================= */
/* Κρύβουμε τα modal του καλαθιού (αν υπάρχουν) μέχρι να τα χρειαστούμε */
.widget_shopping_cart, 
.xoo-wsc-modal { 
    display: none; 
}
body.cart-active .widget_shopping_cart,
body.cart-active .xoo-wsc-modal {
    display: block;
}

.term-description {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 4px; 
    margin-bottom: 40px;
    text-align: center;
    color: #333;
    line-height: 1.6;
    border: 1px solid #eee;
}

/* =========================================
   WISHLIST PAGE SPECIFIC STYLES
========================================= */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 κάρτες στα κινητά */
    gap: 15px;
}
@media (min-width: 768px) {
    .wishlist-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (min-width: 992px) {
    .wishlist-grid { grid-template-columns: repeat(4, 1fr); gap: 30px; }
}

/* Εμφάνιση αν η λίστα είναι άδεια */
.empty-wishlist-message {
    padding: 60px 20px;
    background: #fdfdfd;
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
}
.empty-wishlist-message h3 { margin-bottom: 10px; color: var(--color-text-dark); }
.empty-wishlist-message p { color: #666; font-size: 1rem;}