/* --- VARIABLES --- */
:root {
    --header-bg-color: #361403;
    --text-light: #F0EAD6;
    --accent-color: #C5A059;
    --primary-color: #5d1212;
    --secondary-color: #c5a059;
    --text-color: #333;
    --bg-color: #fdfaf5;
    --white: #ffffff;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'EB Garamond', serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden; /* Αποφυγή οριζόντιου scroll */
}

/* --- HEADER & NAVIGATION --- */
header {
    background-color: var(--header-bg-color);
    color: var(--text-light);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Logo Setup */
.main-logo a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.main-logo img {
    height: 60px;
    transition: height 0.3s;
}

.main-logo .logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

/* Desktop Navigation */
.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.action-icon {
    color: var(--text-light);
    font-size: 1.3rem;
    text-decoration: none;
    position: relative;
}

.cart-count {
    background-color: var(--accent-color);
    color: var(--header-bg-color);
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    padding: 0.2em 0.5em;
    position: absolute;
    top: -8px;
    right: -10px;
}

/* Menu Toggle (Κρυφό στο Desktop) */
.menu-toggle {
    display: none; 
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-light);
}

/* --- SIDEBAR (Mobile Menu) --- */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px; 
    width: 280px;
    height: 100%;
    background-color: var(--header-bg-color);
    z-index: 2000;
    transition: transform 0.3s ease-in-out;
    padding: 2rem;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
}

.mobile-sidebar.active {
    transform: translateX(280px);
}

.sidebar-header {
    text-align: right;
    margin-bottom: 2rem;
    color: var(--accent-color);
    font-size: 1.8rem;
    cursor: pointer;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    z-index: 1999;
}

.sidebar-overlay.active {
    display: block;
}

/* --- HERO SECTION --- */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--header-bg-color);
    color: var(--text-light);
    min-height: 85vh;
    padding: 2rem 5%;
    overflow: hidden;
}

.hero-text-content {
    flex: 1;
    padding-right: 3rem;
    max-width: 50%;
    z-index: 1;
}

.hero-subtitle {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    background-color: var(--accent-color);
    color: var(--header-bg-color);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
    font-weight: bold;
}

.btn:hover {
    background-color: #d4b475;
}

.hero-image-container {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-container::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(93, 61, 45, 0.8); /* Brownish overlay */
    pointer-events: none;
}

.hero-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* --- GALLERY SECTIONS --- */
.gallery-section {
    padding: 5rem 5%;
}

.gallery-section h2 {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-desc {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
    color: #666;
}

.alt-bg {
    background-color: #f5f0e6;
}

.gallery-grid {
    display: grid;
    /* Χρησιμοποιούμε auto-fit αντί για auto-fill */
    grid-template-columns: repeat(auto-fit, 300px); 
    gap: 2.5rem;
    
    /* Αυτό κεντράρει ολόκληρο το γκρουπ των καρτών */
    justify-content: center; 
    
    /* Αυτό κεντράρει τις κάρτες μέσα στις στήλες τους */
    justify-items: center; 
    
    margin: 0 auto;
    width: 100%;
    max-width: 1200px; /* Προσαρμόζεται ανάλογα με το πόσο πλάτος θες να πιάνουν */
}

/* Συγκεκριμένα για το Section των Available, αν θες να είσαι σίγουρος 
   ότι θα πιάσει μόνο εκεί αν οι κάρτες είναι λίγες: */
#available-gallery {
    justify-content: center;
}

/* --- CARDS --- */
.card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card-image-container {
    position: relative;
    height: 350px;
    overflow: hidden;
}

.card-image-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(93, 61, 45, 0.60); /* Light brown overlay */
    pointer-events: none;
    z-index: 1;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    text-align: center;
}

.card-content h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
    display: block;
    margin-bottom: 1rem;
}

.card-buttons {
    display: flex;
    gap: 0.5rem;
}

.buy-btn, .view-btn {
    flex: 1;
    padding: 0.7rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
}

.buy-btn {
    background-color: var(--primary-color);
    color: white;
}

.view-btn {
    background-color: var(--header-bg-color);
    color: var(--text-light);
}

.buy-btn:hover { background-color: #801a1a; }
.view-btn:hover { background-color: #4d200a; }

/* --- FOOTER --- */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 3rem;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
}




/* --- PRODUCT PAGE STYLES --- */
.product-container {
    display: flex;
    max-width: 1200px;
    margin: 4rem auto 2rem auto;
    padding: 0 2rem;
    gap: 4rem;
    align-items: flex-start;
}

/* Gallery Style */
.product-gallery { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
}

.main-image-viewer {
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    max-height: 70vh; 
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-image-viewer img { 
    width: 100%; 
    height: 100%; 
    display: block; 
    object-fit: contain; 
}

.thumbnail-list { 
    display: flex; 
    gap: 0.75rem; 
    overflow-x: auto; 
    padding: 0.5rem 0; 
}

.thumb-item { 
    width: 80px; 
    height: 80px; 
    border-radius: 4px; 
    overflow: hidden; 
    cursor: pointer; 
    border: 2px solid transparent; 
    transition: all 0.2s ease; 
    flex-shrink: 0; 
}

.thumb-item.active { 
    border-color: var(--primary-color); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); 
}

.thumb-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* Info Style */
.product-info { 
    flex: 1; 
}

.product-info h1 { 
    font-family: 'Playfair Display', serif; 
    font-size: 2.5rem; 
    margin-bottom: 1rem; 
    color: var(--primary-color); 
}

.product-info .price { 
    font-size: 2rem; 
    color: #8b4513; 
    font-weight: bold; 
    display: block; 
    margin-bottom: 2rem; 
}

.product-description { 
    font-size: 1.1rem; 
    margin-bottom: 3rem; 
    color: #444; 
    line-height: 1.8; 
    white-space: pre-line; 
}

.back-link { 
    display: inline-block; 
    margin-bottom: 1.5rem; 
    color: #666; 
    text-decoration: none; 
    transition: 0.3s; 
}

.back-link:hover { 
    color: var(--primary-color); 
}

/* Related Works Section (Κεντραρισμένο Grid) */
.related-works-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
    border-top: 1px solid #eee;
    padding-top: 3rem;
}

.related-works-section h2 {
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* Χρήση auto-fit για κεντράρισμα των Related Works */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 280px); 
    gap: 2.5rem;
    justify-content: center; 
    justify-items: center;
}

/* --- RESPONSIVE ΔΙΟΡΘΩΣΕΙΣ ΓΙΑ ΤΗ ΣΕΛΙΔΑ ΠΡΟΪΟΝΤΟΣ --- */
@media (max-width: 768px) {
    .product-container { 
        flex-direction: column; 
        padding: 1rem; 
        gap: 2rem; 
    }
    
    .related-grid { 
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); 
        gap: 1rem; 
    }
}


/* Εφέ μεγέθυνσης στην κύρια εικόνα (Hover Effect) */
.main-image-viewer img {
    transition: transform 0.5s ease;
    cursor: zoom-in;
}

.main-image-viewer:hover img {
    transform: scale(1.05);
}

/* Βελτίωση των Thumbnails */
.thumbnail-list {
    justify-content: center; /* Κεντράρισμα των μικρών εικόνων */
    padding: 1rem 0;
    scrollbar-width: thin; /* Λεπτό scrollbar για Firefox */
}

/* Διακόσμηση στην τιμή */
.product-info .price {
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

/* Κουμπί Αγοράς - να ξεχωρίζει */
.product-info .buy-btn {
    box-shadow: 0 4px 15px rgba(93, 18, 18, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}


.breadcrumb-container {
    max-width: 1200px;
    margin: 1rem auto 0 auto;
    padding: 0 2rem;
}

.breadcrumbs {
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    color: #888;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--accent-color);
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: #ccc;
}

.breadcrumbs .current {
    color: #444;
    font-weight: bold;
}
/* --- PRODUCT PAGE STYLES --- */




/* --- RESPONSIVE DESIGN --- */

/* Tablet & Mobile (Κάτω από 768px) */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Κρύβει το Desktop Menu */
    }

    .menu-toggle {
        display: block; /* Εμφανίζει το Σαντουιτς */
    }

    .main-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .main-logo .logo-text {
        display: none; /* Κρύβει το κείμενο για να μην "χτυπάει" πάνω στο σαντουιτς */
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 4rem;
    }

    .hero-text-content {
        max-width: 100%;
        padding-right: 0;
        margin-bottom: 4rem; /* Το κενό που ζήτησες */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-image-container {
        width: 100%;
        max-width: 400px;
    }
}

/* Μικρά κινητά (Κάτω από 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}