/*
Theme Name: TaiAami Bloom
Theme URI: https://taiaami.in
Author: TaiAami Team
Description: A stunning, trustworthy, mobile-optimized WooCommerce florist theme for Kolkata's premier flower delivery service.
Version: 2.0
Requires PHP: 7.4
Text Domain: taiaami-bloom
WC tested up to: 8.0
*/

/* ========================================
   CSS VARIABLES & RESET
======================================== */
:root {
    --primary: #1B5E42;        /* Deep Forest Green */
    --secondary: #2D8659;      /* Medium Green */
    --accent: #D4AF37;         /* Elegant Gold */
    --action: #E74C3C;         /* Vibrant Red (flowers) */
    --action-hover: #C0392B;   /* Darker Red */
    --bg: #FDFCF8;             /* Warm White */
    --bg-alt: #F8F5F0;         /* Light Beige */
    --text: #2C3E50;           /* Dark Blue-Gray */
    --text-light: #7F8C8D;     /* Medium Gray */
    --border: #E8E4DD;         /* Subtle Border */
    --success: #27AE60;        /* Success Green */
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--action);
}

/* ========================================
   TOP BAR - TRUST SIGNALS
======================================== */
.top-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 12px 5%;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.trust-badges {
    display: flex;
    gap: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.trust-item svg, .trust-item .icon {
    width: 20px;
    height: 20px;
    opacity: 0.9;
}

.contact-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.phone-number {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.phone-number a {
    color: var(--accent);
}

/* ========================================
   HEADER & NAVIGATION
======================================== */
header.site-header {
    background: #fff;
    padding: 20px 5%;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--accent);
}

.header-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.site-branding h1 {
    margin: 0;
}

.site-branding a {
    color: var(--primary);
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-accent {
    color: var(--action);
    font-size: 2.2rem;
}

/* ========================================
   LOGO SCALING & CONSTRAINTS
   Ensures oversized uploaded logos do not break header layout
======================================== */
.site-header .custom-logo-link, .site-header .site-branding { 
    display: flex;
    align-items: center;
}

/* Constrain logo image: keep aspect ratio, prevent layout overflow */
.site-header .custom-logo-link img.custom-logo { 
    max-height: 80px;          /* cap vertical size on desktop */
    max-width: 320px;          /* prevent overly wide images */
    height: auto !important;   /* allow natural scaling */
    width: auto !important;    /* preserve aspect ratio */
    object-fit: contain;       /* avoid cropping */
    padding: 4px 0;            /* slight breathing space */
}

/* Adjust logo size for smaller screens */
@media (max-width: 968px) {
    .site-header .custom-logo-link img.custom-logo {
        max-height: 60px;
        max-width: 240px;
    }
}

@media (max-width: 640px) {
    .site-header .custom-logo-link img.custom-logo {
        max-height: 50px;
        max-width: 200px;
    }
}

nav.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

nav.main-navigation a {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 8px 0;
    position: relative;
}

nav.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--action);
    transition: width 0.3s ease;
}

nav.main-navigation a:hover::after,
nav.main-navigation a.current-menu-item::after {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.woocommerce-cart-link,
.account-link {
    font-size: 24px;
    position: relative;
    color: var(--primary);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--action);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--primary);
    cursor: pointer;
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
    background: linear-gradient(135deg, rgba(27,94,66,0.95) 0%, rgba(45,134,89,0.9) 100%), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><path fill="%23ffffff" fill-opacity="0.05" d="M0,160L48,170.7C96,181,192,203,288,197.3C384,192,480,160,576,160C672,160,768,192,864,202.7C960,213,1056,203,1152,192C1248,181,1344,171,1392,165.3L1440,160L1440,400L1392,400C1344,400,1248,400,1152,400C1056,400,960,400,864,400C768,400,672,400,576,400C480,400,384,400,288,400C192,400,96,400,48,400L0,400Z"></path></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 80px 20px;
    position: relative;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 15px;
    opacity: 0.95;
    font-weight: 300;
}

.trust-highlights {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.trust-highlight {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
}

.trust-highlight svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.cta-button {
    background: var(--action);
    color: white;
    padding: 16px 40px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--action-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.5);
}

.cta-button.secondary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cta-button.secondary:hover {
    background: var(--bg-alt);
    color: var(--action);
}

/* ========================================
   CATEGORY SHOWCASE
======================================== */
.category-showcase {
    padding: 60px 5%;
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--primary);
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 18px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.category-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-info {
    padding: 25px;
    text-align: center;
}

.category-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.category-info p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.category-link {
    display: inline-block;
    color: var(--action);
    font-weight: 600;
    padding: 10px 25px;
    border: 2px solid var(--action);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: var(--action);
    color: white;
}

/* ========================================
   CONTAINER & LAYOUT
======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 5%;
}

.container.narrow {
    max-width: 1000px;
}

/* ========================================
   WOOCOMMERCE PRODUCTS GRID
======================================== */
ul.products {
    display: grid;
    /* Default desktop: four columns */
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    width: 100%;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
    margin: 0;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    min-height: 480px; /* consistent height */
}

.woocommerce ul.products li.product:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-6px);
}

.woocommerce ul.products li.product .onsale {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--action);
    color: #fff;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 4px 14px rgba(231,76,60,.35);
}

.woocommerce ul.products li.product a {
    display: block;
    text-decoration: none;
}

.woocommerce ul.products li.product img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    transition: transform .5s ease;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--primary);
    margin: 18px 18px 6px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .3px;
    min-height: 60px; /* reserve space for two lines */
}

.woocommerce ul.products li.product .price {
    color: var(--action);
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 18px 4px;
    display: block;
}

.woocommerce ul.products li.product .price del {
    color: var(--text-light);
    font-size: .9rem;
    margin-right: 6px;
    opacity: .75;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
    background: var(--action);
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 12px 26px;
    margin: 14px 18px 22px;
    font-weight: 600;
    font-size: .9rem;
    line-height: 1;
    transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: auto; /* ensure button sits at bottom for uniform cards */
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .added_to_cart:hover {
    background: var(--action-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(231,76,60,.45);
}

/* Star Ratings */
.woocommerce .star-rating {
    color: var(--accent);
    margin: 10px auto;
}

/* Product card content wrapper for consistent spacing */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button {
    /* ensure interior elements do not touch edges */
}

/* Responsive product grid adjustments */
@media (max-width: 1400px) {
    ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
    ul.products { grid-template-columns: repeat(2, 1fr); gap: 28px; }
    .woocommerce ul.products li.product { min-height: 460px; }
}
@media (max-width: 640px) {
    ul.products { grid-template-columns: 1fr; gap: 24px; }
    .woocommerce ul.products li.product { min-height: auto; }
    .woocommerce ul.products li.product img { height: 220px; }
}

/* ========================================
   SINGLE PRODUCT PAGE
======================================== */
.woocommerce div.product {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.woocommerce div.product .product_title {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    font-size: 2.5rem;
}

.woocommerce div.product p.price {
    color: var(--action);
    font-size: 2rem;
    font-weight: 700;
}

.woocommerce div.product form.cart .button {
    background: var(--action);
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
}

.woocommerce div.product form.cart .button:hover {
    background: var(--action-hover);
}

/* ========================================
   CART & CHECKOUT
======================================== */
.woocommerce-cart-form,
.woocommerce-checkout {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.woocommerce table.shop_table {
    border: 1px solid var(--border);
    border-radius: 8px;
}

.woocommerce-cart .wc-proceed-to-checkout .button,
.woocommerce #place_order {
    background: var(--action) !important;
    color: white !important;
    padding: 15px 40px !important;
    font-size: 18px !important;
    border-radius: 50px !important;
    width: 100%;
    font-weight: 600;
}

.woocommerce-cart .wc-proceed-to-checkout .button:hover,
.woocommerce #place_order:hover {
    background: var(--action-hover) !important;
}

/* ========================================
   TRUST & FEATURES SECTION
======================================== */
.features-section {
    padding: 60px 5%;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: var(--bg-alt);
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
}

.feature-item h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   TESTIMONIALS
======================================== */
.testimonials-section {
    padding: 60px 5%;
    background: var(--bg-alt);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto 0;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    position: relative;
}

.testimonial-rating {
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 15px;
}

.testimonial-text {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary);
}

/* ========================================
   FOOTER
======================================== */
footer.site-footer {
    background: linear-gradient(135deg, var(--primary) 0%, #0F3D2E 100%);
    color: white;
    padding: 60px 5% 30px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-about p {
    line-height: 1.8;
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-contact-info {
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.9);
}

.contact-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.payment-methods img {
    height: 30px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.payment-methods img:hover {
    opacity: 1;
}
/* Enhanced payment icons */
.accept-label { opacity: .75; font-size: 14px; letter-spacing: .5px; }
.payment-icons { display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
.payment-icons img { height:32px; width:auto; filter:grayscale(15%); opacity:.85; background:#fff; padding:4px 6px; border-radius:6px; box-shadow:0 2px 6px rgba(0,0,0,.15); }
.payment-icons img:hover { opacity:1; filter:none; }

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
======================================== */
@media (max-width: 968px) {
    .top-bar {
        justify-content: center;
        text-align: center;
    }
    
    .header-wrapper {
        flex-wrap: wrap;
    }
    
    nav.main-navigation {
        display: none;
        width: 100%;
        order: 3;
    }
    
    nav.main-navigation.active {
        display: block;
    }
    
    nav.main-navigation ul {
        flex-direction: column;
        gap: 0;
        background: var(--bg-alt);
        padding: 20px;
        border-radius: 8px;
        margin-top: 20px;
    }
    
    nav.main-navigation li {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero {
        padding: 60px 20px;
    }
    
    .trust-highlights {
        gap: 15px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
    
    ul.products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-item {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .site-branding a {
        font-size: 1.5rem;
    }
    
    ul.products {
        grid-template-columns: 1fr;
    }
    
    .woocommerce ul.products li.product img {
        height: 250px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ACCESSIBILITY & UX ENHANCEMENTS
======================================== */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    .top-bar,
    header.site-header,
    .hero,
    footer.site-footer {
        display: none;
    }
}