/*
 Theme Name:   Astra Child — Tailormades
 Theme URI:    https://tailormades.gr
 Description:  Child theme για το Tailormades.gr
 Author:       Tailormades
 Template:     astra
 Version:      1.0.0
*/

/* ============================================
   1. BOXED LAYOUT & WooCommerce
   Global boxed — Homepage full-width exception
   ============================================ */
.ast-boxed-container #page,
.ast-container,
.site-content .ast-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

body.home .ast-container,
body.home .site-content .ast-container,
body.home .ast-boxed-container #page {
    max-width: 100% !important;
    padding: 0 !important;
}

.woocommerce ul.products { justify-content: center !important; }

/* ============================================
   2. DYNAMIC CART BADGE
   ============================================ */
.cart-icon {
    position: relative !important;  /* Βάση για badge */
}
.cart-count {
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    background: #000000 !important;
    color: #E7A572 !important;
    font-size: 10px !important;
    font-weight: bold !important;
    min-width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    border-radius: 50% !important;
    text-align: center !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0) !important;
}

/* ============================================
   3. WOOCOMMERCE VARIATIONS
   ============================================ */
/* Optional: Καλύτερο spacing μετά από variations (για να μην φαίνεται κενό) */
.woocommerce div.product form.cart .variations {
    margin-bottom: 20px !important;
}

/* ============================================
   4. BREADCRUMBS
   ============================================ */
/* Κρύψε τα WooCommerce breadcrumbs σε όλες τις σελίδες
.woocommerce-breadcrumb {
    display: none !important;
}
*/

/* ============================================
   5. CATEGORY CARDS
   Τίτλος κάτω από thumbnail
   ============================================ */
/* Μετέφερε τον Τίτλο της Κατηγορίας κάτω από το Thumbnail */
.woocommerce ul.products li.product.product-category a.woocommerce-loop-category__link {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important; /* Στοίβαξη: εικόνα πάνω, τίτλος κάτω */
    align-items: center !important; /* Κεντράρισμα */
}

.woocommerce ul.products li.product.product-category img {
    position: relative !important; /* Βεβαιώσου ότι η εικόνα δεν είναι absolute */
    margin-bottom: 10px !important; /* Χώρος κάτω από την εικόνα – προσαρμόσου π.χ. 5-20px */
    width: 100% !important; /* Για να γεμίσει το container */
}

.woocommerce ul.products li.product.product-category .woocommerce-loop-category__title {
    position: relative !important; /* Αφαίρεση absolute positioning */
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    background: none !important; /* Αφαίρεση του λευκού transparent φόντου */
    padding: 0 !important; /* Αφαίρεση padding */
    margin: 0 !important;
    text-align: center !important;
    width: 100% !important; /* Για να ταιριάξει */
}

/* ============================================
   6. PRICE PREVIEW SYSTEM
   ============================================ */

/* Fix: final-price-message μέσα σε flex container */
.woocommerce-variation-add-to-cart {
    flex-wrap: wrap !important;
}

.woocommerce-variation-add-to-cart .final-price-message {
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-top: 16px !important;
}

/* Μετακίνηση μηνύματος τελικής τιμής κάτω από button, με block layout */
.final-price-message {
    display: block !important;  /* Κάνει το μήνυμα full-width block */
    margin-top: 16px !important;  /* Κενό από πάνω (από button) */
    margin-bottom: 10px !important;  /* Κενό από κάτω */
    font-size: 0.9em !important;
    color: #924A08 !important; /* #CE0F0F */
    font-weight: 400 !important;
    text-align: left !important;
    clear: both !important;  /* Βεβαιώνει ότι πηγαίνει κάτω, όχι δίπλα */
}

/* Styling για preview τιμή */
.final-price-message {
    display: block !important;
    width: 100% !important;
    flex-basis: 100% !important;
    margin-top: 16px !important;
    margin-bottom: 10px !important;
    font-size: 1em !important;
    color: #101827 !important;
    font-weight: 400 !important;
    text-align: left !important;
    clear: both !important;
}
.preview-price {
    font-weight: bold !important;
    color: #101827 !important;
    font-size: 1.2em !important;
}

/* Preview τιμής */
.preview-price {
    font-weight: 600;
    font-size: 1.2em;
    color: #101827;
    margin-top: 6px;
}

/* Retail badge */
.retail-badge {
    font-size: 0.85em;
    font-weight: 400;
    color: #924A08;
    margin-top: 6px;
    margin-bottom: 6px;
}

/* Wholesale badge */
.wholesale-badge {
    font-size: 0.85em;
    font-weight: 400;
    color: #924A08;
    margin-top: 6px;
    margin-bottom: 6px;
}

/* Final message wrapper */
.final-price-message {
    margin-top: 16px;
    font-size: 0.9em;
    line-height: 1.4;
}

/* ============================================
   7. PRODUCT DESCRIPTION
   ============================================ */
.product-description-tailormades {
    line-height: 1.6;
    max-width: 100%;
}
.product-features li,
.fine-print li {
    margin-bottom: 0.5em;
}
.ordering-guide ol {
    padding-left: 1.5em;
}
.cta-section {
    text-align: center;
    margin: 2em 0;
    padding: 1em;
    background: #f8f9fa; /* Light BG για CTA */
    border-radius: 8px;
}
@media (max-width: 768px) {
    .cta-section { padding: 2em; }
}

/* ============================================
   8. PRICING TABLE
   ============================================ */
.tailormades-pricing-table th { background: #f8f9fa !important; }
.tailormades-pricing-table tr:nth-child(even) { background: #f9f9f9; }

/* ============================================
   9. SMOOTH SCROLL & ORDER NOW
   ============================================ */
/* "Order Now" Smooth scroll global */
html {
    scroll-behavior: smooth;
}

/* Order Now styling */
.order-now-scroll {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.order-now-scroll:hover img {
    opacity: 0.8;
    transform: scale(1.05);
}

/* "Order Now" Offset για sticky (sync με JS) */
#product-options {
    scroll-margin-top: 100px;
}

/* ============================================
   10. HOMEPAGE CATEGORY SECTIONS CAROUSEL
   ============================================ */

/* 2 προϊόντα στο half-section carousel */
.tm-carousel-half .tm-carousel-track li.product {
    flex: 0 0 calc(50% - 10px) !important;
}

/* Round corners στις φωτογραφίες carousel */
.tm-carousel-half .woocommerce-LoopProduct-link img,
.tm-carousel-single .woocommerce-LoopProduct-link img {
    border-radius: 50% !important;
}

/* Subcategory — λευκό */
.tm-carousel-half .ast-woo-product-category,
.tm-carousel-single .ast-woo-product-category {
    color: #FFFFFF !important;
}

/* Τίτλος προϊόντος — λευκό */
.tm-carousel-half .woocommerce-loop-product__title {
    color: #FFFFFF !important;
}

/* Τιμή — λευκό */
.tm-carousel-half .price {
    color: #FFFFFF !important;
}

/* Links — λευκό */
.tm-carousel-half .product a {
    color: #FFFFFF !important;
}

/* Add to Cart button */
.tm-carousel-half .button.add_to_cart_button,
.tm-carousel-half a.button {
    background-color: #E7A572 !important;
    color: #000000 !important;
    border: none !important;
}

/* Center alignment για single carousel */
.tm-carousel-single .woocommerce-loop-product__title,
.tm-carousel-single .ast-woo-product-category,
.tm-carousel-single .price,
.tm-carousel-single .button.add_to_cart_button,
.tm-carousel-single a.button {
    text-align: center !important;
    display: block !important;
}

/* Invisible arrows */
.tm-carousel-single .tm-carousel-btn {
    background: transparent !important;
    color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Arrow buttons */
.tm-carousel-half .tm-carousel-btn {
    background: #E7A572 !important;
    color: #000000 !important;
    border: none !important;
}

/* ============================================
   11. TRUST SECTION
   ============================================ */

.tm-trust-section {
    border-top: 3px solid #E7A572;
    border-bottom: 3px solid #E7A572;
}

.tm-trust-section h3 {
    margin-bottom: 15px !important;
}
