/*
 Theme Name: Bloomify
 Description: Main CSS for Bloomify Theme
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 Variables
2.0 Reset & Basics
3.0 Typography
4.0 Layout & Grid
5.0 Header
6.0 Components (Buttons, Forms)
7.0 Sections (Hero, Cards)
8.0 Blog & Pages
9.0 Footer
10.0 WooCommerce Overrides
11.0 Animations
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 Variables
--------------------------------------------------------------*/
:root {
    /* Colors */
    --color-primary: #6e8a61;
    /* Soft green */
    --color-primary-hover: #5a734e;
    --color-secondary: #f0d9d6;
    /* Soft pastel pink */
    --color-accent: #c08d92;
    /* Darker pink for contrast */

    --color-text-main: #333333;
    --color-text-light: #666666;

    --color-bg-body: #fbfaf8;
    /* Warm off-white */
    --color-bg-light: #ffffff;
    --color-bg-dark: #2c362a;
    /* Deep green */

    --color-border: #e6e4df;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(110, 138, 97, 0.15);

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/*--------------------------------------------------------------
2.0 Reset & Basics
--------------------------------------------------------------*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/*--------------------------------------------------------------
3.0 Typography
--------------------------------------------------------------*/
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-top: 0;
    margin-bottom: var(--space-sm);
    color: var(--color-text-main);
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.25rem;
}

.text-center {
    text-align: center;
}

/*--------------------------------------------------------------
4.0 Layout & Grid
--------------------------------------------------------------*/
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--space-xl) 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

.bg-dark {
    background-color: var(--color-bg-dark);
    color: white;
}

/*--------------------------------------------------------------
5.0 Header
--------------------------------------------------------------*/
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid transparent;
}

.site-header--transparent {
    background-color: transparent;
    /* If there's a hero image directly under */
}

.site-header--solid,
.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--color-border);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
}

.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.site-title a {
    color: var(--color-text-main);
}

.site-header.scrolled .site-title a {
    color: var(--color-text-main);
}

/* Navigation */
.main-navigation ul {
    display: flex;
    gap: var(--space-md);
}

.main-navigation a {
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item>a::after {
    width: 100%;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.header-action-btn:hover {
    color: var(--color-primary);
}

.cart-contents {
    position: relative;
}

.cart-icon {
    position: relative;
    display: flex;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--color-primary);
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.menu-toggle {
    display: none;
}

/*--------------------------------------------------------------
6.0 Components (Buttons, Forms)
--------------------------------------------------------------*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-bg-light);
    font-family: inherit;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(110, 138, 97, 0.1);
}

/*--------------------------------------------------------------
7.0 Sections (Hero, Cards)
--------------------------------------------------------------*/
/* Hero Section */
.hero-section {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    position: relative;
    text-align: center;
    padding-top: 80px;
    /* Offset for header */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(240, 217, 214, 0.4), rgba(251, 250, 248, 0.2));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-title {
    font-size: 4.5rem;
    color: var(--color-dark);
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-main);
    margin-bottom: var(--space-lg);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.category-card {
    background-color: var(--color-bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-align: center;
    padding: var(--space-md);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-image {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-sm);
    background-color: var(--color-secondary);
    border-radius: 50%;
}

.category-title {
    font-size: 1.1rem;
    margin: 0;
}

/* Newsletter */
.newsletter-section {
    background-color: var(--color-secondary);
    text-align: center;
}

.newsletter-inner {
    max-width: 600px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: var(--space-md);
}

.newsletter-form input {
    flex: 1;
    border-radius: 30px;
    border: none;
    padding-left: 20px;
}

/*--------------------------------------------------------------
8.0 Blog & Pages
--------------------------------------------------------------*/
.main-content-area {
    padding: calc(80px + var(--space-xl)) 20px var(--space-xl);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.blog-card {
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.blog-card__image {
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.blog-card__image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.8s ease;
}

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

.blog-card__content {
    padding: var(--space-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.entry-meta a {
    color: var(--color-primary);
}

.entry-title {
    font-size: 1.4rem;
    margin-bottom: var(--space-sm);
}

.entry-title a {
    color: var(--color-text-main);
}

.entry-title a:hover {
    color: var(--color-primary);
}

.entry-content {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/*--------------------------------------------------------------
9.0 Footer
--------------------------------------------------------------*/
.site-footer {
    background-color: var(--color-bg-dark);
    color: var(--color-border);
}

.site-footer a {
    color: #fff;
}

.site-footer a:hover {
    color: var(--color-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
}

.widget-title {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-sm) 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.footer-menu {
    display: flex;
    gap: var(--space-md);
}

/*--------------------------------------------------------------
10.0 WooCommerce Overrides
--------------------------------------------------------------*/
.woocommerce-main-wrapper {
    padding: calc(80px + var(--space-xl)) 0;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce ul.products li.product .price {
    color: var(--color-primary);
    font-weight: 600;
}

.woocommerce span.onsale {
    background-color: var(--color-accent);
    color: white;
    padding: 5px 10px;
    border-radius: 30px;
    min-height: auto;
    min-width: auto;
    line-height: 1;
    font-weight: 500;
    font-size: 12px;
    top: 10px;
    left: 10px;
    right: auto;
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background-color: var(--color-primary);
    color: white;
    border-radius: 30px;
    padding: 12px 28px;
    font-weight: 500;
    transition: var(--transition);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    background-color: var(--color-primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Product Cards */
.woocommerce ul.products li.product {
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    padding-bottom: 20px;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.woocommerce ul.products li.product a img {
    margin-bottom: var(--space-md);
    transition: transform 0.5s ease;
}

.woocommerce ul.products li.product:hover a img {
    transform: scale(1.05);
}

/*--------------------------------------------------------------
11.0 Animations
--------------------------------------------------------------*/
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 991px) {

    .categories-grid,
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.2rem;
    }

    .main-navigation ul {
        display: none;
        /* simple hidden for mobile, can add JS toggle */
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

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

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}