/* Αρχείο: store-style.css */

:root {
    --bg-color: #f3f6fc;
    --panel-bg: rgba(255, 255, 255, 0.6);
    --panel-border: rgba(0, 0, 0, 0.08);
    --text-color: #1a1a1a;
    --subtle-text-color: #606060;
    --primary-color: #0078d4;
    --primary-color-hover: #005a9e;
    --success-color: #107c10;
    --border-radius-main: 12px;
    --border-radius-subtle: 8px;
    --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* --- Global Styles --- */
body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s ease;
}
a:hover { color: var(--primary-color-hover); }

/* --- Top Bar (Header) --- */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--panel-border);
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    letter-spacing: -1px;
}
.logo span { color: var(--primary-color); }

.main-nav a {
    margin: 0 15px;
    font-weight: 600;
    font-size: 16px;
    color: var(--subtle-text-color);
    position: relative;
    padding: 5px 0;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.main-nav a:hover::after { width: 100%; }
.main-nav a:hover { color: var(--text-color); }

.search-bar { display: flex; align-items: center; }
.search-bar input {
    width: 300px;
    padding: 10px 15px;
    border: 1px solid var(--panel-border);
    border-radius: var(--border-radius-subtle);
    font-size: 15px;
    margin-right: -1px; /* Overlap with button */
}
.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.2);
}
.search-bar button {
    padding: 10px 15px;
    border: 1px solid var(--primary-color);
    background-color: var(--primary-color);
    color: white;
    border-radius: 0 var(--border-radius-subtle) var(--border-radius-subtle) 0;
    cursor: pointer;
    font-size: 16px;
}

.user-actions a {
    font-size: 1.5em;
    margin-left: 20px;
    color: var(--subtle-text-color);
    position: relative;
}
.user-actions .cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.6em;
    font-weight: bold;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Store Layout (Sidebar + Main Content) --- */
.store-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 30px;
    max-width: 1800px;
    margin: 0 auto;
}

/* --- Category Sidebar --- */
.category-sidebar {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-light);
    height: fit-content; /* Make it stick to content */
    position: sticky;
    top: 100px; /* Top Bar height + padding */
}
.category-sidebar h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--panel-border);
}
.category-sidebar ul { list-style: none; padding: 0; margin: 0; }
.category-sidebar a {
    display: block;
    padding: 12px 15px;
    border-radius: var(--border-radius-subtle);
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.category-sidebar a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* --- Main Store Content --- */
.main-content-store h2 {
    font-size: 2em;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--panel-border);
}

/* --- Product Grid & Cards --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: #fff;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.product-card:hover .product-overlay { opacity: 1; }
.product-overlay .btn {
    background-color: #fff;
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transform: translateY(20px);
    transition: transform 0.3s ease, background-color 0.2s ease;
}
.product-card:hover .product-overlay .btn { transform: translateY(0); }
.product-overlay .btn:hover { background-color: var(--bg-color); }

.product-details { padding: 20px; }
.product-category {
    font-size: 0.8em;
    color: var(--subtle-text-color);
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
}
.product-name {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 15px 0;
    height: 50px; /* Ensure same height */
}

.product-price {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-color);
}
.product-price .original-price {
    text-decoration: line-through;
    color: var(--subtle-text-color);
    font-size: 0.7em;
    margin-right: 10px;
}
.product-price .discount-price {
    color: var(--success-color);
}

/* --- Special Link for Service Tracking --- */
.service-link {
    color: #e63946 !important; /* Ένα έντονο κόκκινο χρώμα */
    font-weight: 700 !important;
    animation: pulse-red 1.5s infinite alternate;
    border-radius: 5px; /* Στρογγυλεύει ελαφρώς τις γωνίες για καλύτερη εμφάνιση του εφέ */
    padding-left: 5px !important;  /* Λίγο κενό για να μην κολλάει στο προηγούμενο */
    padding-right: 5px !important; /* Λίγο κενό για να μην κολλάει στο επόμενο */
}

/* Keyframe animation for the pulsing effect */
@keyframes pulse-red {
    from {
        /* Κανονική κατάσταση */
        text-shadow: 0 0 5px rgba(230, 57, 70, 0.4);
        background-color: transparent;
    }
    to {
        /* Η κατάσταση με το εφέ */
        text-shadow: 0 0 15px rgba(230, 57, 70, 1);
        background-color: rgba(230, 57, 70, 0.1);
    }
}

/* --- Styles for Forms (Login, Register etc.) --- */
.form-page-wrapper {
    padding: 40px 20px;
    min-height: calc(100vh - 150px); /* Adjust height to fill screen */
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-card {
    width: 100%;
    max-width: 600px;
    padding: 40px;
    background-color: #ffffff;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-medium);
    animation: fadeIn 0.5s ease-in-out; /* Add a nice fade-in effect */
}

.form-card h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 600;
}

/* General styles for form groups, inputs, and buttons are already in store-style.css */
/* We just need to make sure buttons can be full-width */
.btn-full-width {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* Animation definition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- GDPR Cookie Banner Styles --- */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2e3440; /* Ένα σκούρο, μοντέρνο χρώμα */
    color: #eceff4;
    padding: 20px 30px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    z-index: 2000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transform: translateY(100%); /* Ξεκινάει κρυμμένο κάτω από τη σελίδα */
    transition: transform 0.5s ease-in-out;
}

.cookie-consent-banner.active {
    transform: translateY(0); /* Εμφανίζεται με slide-up εφέ */
}

.cookie-consent-banner p {
    margin: 0;
    font-size: 0.9em;
}

.cookie-consent-banner a {
    color: #88c0d0; /* Ένα διακριτικό γαλάζιο για links */
    text-decoration: underline;
}

.cookie-consent-banner .btn-accept {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: var(--border-radius-subtle);
    cursor: pointer;
    white-space: nowrap; /* Για να μην σπάει η λέξη */
}

/* --- Footer Styles --- */
.site-footer {
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    background-color: #e5e9f0;
    color: var(--subtle-text-color);
    font-size: 0.9em;
    border-top: 1px solid var(--panel-border);
}

/* --- Special Effect for On-Sale Products --- */

/* 
 * 1. Δίνουμε στην κάρτα μια σχετική θέση για να μπορέσουμε να 
 *    προσθέσουμε ένα διακριτικό ταμπελάκι "SALE" πάνω της.
*/
.product-card.on-sale {
    position: relative;
    /* 
     * 2. Εφαρμόζουμε την παλλόμενη σκιά. Θα χρησιμοποιήσουμε την ίδια λογική 
     *    με το service-link, αλλά με box-shadow αντί για text-shadow.
    */
    animation: pulse-border 1.5s infinite alternate;
}

/* 
 * 3. Προσθέτουμε ένα ταμπελάκι "SALE" στην πάνω δεξιά γωνία.
 *    Αυτό είναι ένα επιπλέον οπτικό βοήθημα.
*/
.product-card.on-sale::after {
    content: 'SALE';
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #e63946; /* Το ίδιο κόκκινο χρώμα */
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 700;
    z-index: 10;
}


/* 
 * 4. Ορίζουμε την κίνηση "pulse-border". 
 *    Αλλάζει ομαλά τη σκιά της κάρτας από μια διακριτική κόκκινη
 *    σε μια πιο έντονη, δημιουργώντας ένα "αναπνέον" εφέ.
*/
@keyframes pulse-border {
    from {
        box-shadow: 0 4px 16px rgba(230, 57, 70, 0.2);
    }
    to {
        box-shadow: 0 4px 25px rgba(230, 57, 70, 0.5);
    }
}

/* --- Styles for Category Page --- */

/* 1. Η νέα, εντυπωσιακή κεφαλίδα */
.category-header {
    padding: 40px;
    background: linear-gradient(45deg, rgba(243, 246, 252, 1) 0%, rgba(229, 233, 240, 1) 100%);
    border-radius: var(--border-radius-main);
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid var(--panel-border);
}

.category-header .breadcrumbs {
    font-size: 0.9em;
    margin-bottom: 10px;
}
.category-header .breadcrumbs a {
    color: var(--subtle-text-color);
    font-weight: 500;
}
.category-header .breadcrumbs span {
    color: var(--text-color);
    font-weight: 600;
}

.category-header h1 {
    font-size: 3em;
    margin: 0;
    color: var(--primary-color);
}
.category-header p {
    margin: 5px 0 0 0;
    color: var(--subtle-text-color);
    font-weight: 500;
}

/* 2. Τα φίλτρα ταξινόμησης */
.sort-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    align-items: center;
}
.sort-options label {
    margin-right: 10px;
    font-weight: 600;
}
.sort-options select {
    padding: 8px 12px;
    border-radius: var(--border-radius-subtle);
    border: 1px solid var(--panel-border);
    font-weight: 500;
}

/* 3. Το εφέ εμφάνισης των προϊόντων */
.product-card {
    /* Ξεκινούν αόρατα και ελαφρώς πιο κάτω */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.product-card.visible {
    /* Η κατάσταση στην οποία έρχονται όταν εμφανίζονται */
    opacity: 1;
    transform: translateY(0);
}

/* --- Styles for Super Offer Emoticon --- */

.super-offer-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 2.5em; /* Μέγεθος του emoticon */
    z-index: 11; /* Πάνω από το ταμπελάκι "SALE" */
    animation: bounce-and-rotate 2s ease-in-out infinite;
    transform-origin: bottom right; /* Το σημείο από το οποίο θα "κουνιέται" */
}

@keyframes bounce-and-rotate {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(15deg); }
    50% { transform: scale(1) rotate(0deg); }
    75% { transform: scale(1.2) rotate(-15deg); }
    100% { transform: scale(1) rotate(0deg); }
}