/* Ecommerce Template - Complete CSS */
/* Font styles */
/* Elegant Font Pair: Montserrat + Open Sans */
/* Geometric sans-serif with humanist touch */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Open+Sans:wght@300;400;500;600;700&display=swap');

/* Font variables for elegant theme */
:root {
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    --font-family: var(--body-font);
}

/* Apply fonts to elements */
body {
    font-family: var(--body-font);
    font-weight: 400;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

.btn {
    font-family: var(--heading-font);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.post-title {
    font-family: var(--heading-font);
    font-weight: 600;
}

.section-title {
    font-family: var(--heading-font);
    font-weight: 700;
}

.logo h1 {
    font-family: var(--heading-font);
    font-weight: 700;
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--heading-font);
    font-weight: 600;
}

.post-meta {
    font-family: var(--body-font);
    font-weight: 500;
}

.post-category {
    font-family: var(--heading-font);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.newsletter-content h2 {
    font-family: var(--heading-font);
    font-weight: 600;
}

.hero-title {
    font-family: var(--heading-font);
    font-weight: 700;
}


* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-color: #111827;
    --text-light: #6b7280;
    --background-color: #ffffff;
    --background-light: #f8fafc;
    --border-color: #e5e7eb;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin-bottom: var(--spacing-sm); }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

/* Header */
.header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    gap: var(--spacing-md);
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
}

.logo a { color: var(--text-color); }

.search-bar {
    flex: 1;
    max-width: 400px;
}

.search-form {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    font-size: 1rem;
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.wishlist-btn, .cart-btn, .account-btn {
    position: relative;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.15s;
    font-size: 1.2rem;
}

.wishlist-btn:hover, .cart-btn:hover, .account-btn:hover {
    color: var(--primary-color);
}

.wishlist-count, .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--error-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 50%;
    min-width: 1.25rem;
    text-align: center;
}

.nav {
    border-top: 1px solid var(--border-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    padding: var(--spacing-sm) 0;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.15s;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 2px 0;
    transition: all 0.15s;
}

/* Hero */
.hero-banner {
    background-color: var(--background-light);
    padding: var(--spacing-xl) 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

/* Page Header */
.page-header {
    background-color: var(--background-light);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

/* Categories */
.categories-section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.view-all-link {
    color: var(--primary-color);
    font-weight: 500;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.category-card {
    text-align: center;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    transition: transform 0.25s;
    background-color: var(--background-light);
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.category-content h3 {
    margin-bottom: 0.5rem;
}

.category-content p {
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

.category-link {
    color: var(--primary-color);
    font-weight: 500;
}

/* Products */
.featured-products {
    padding: var(--spacing-xl) 0;
    background-color: var(--background-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background-color: var(--background-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.25s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.35s;
}

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

.product-badges {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.badge.sale { background-color: var(--error-color); }
.badge.new { background-color: var(--success-color); }
.badge.bestseller { background-color: var(--warning-color); }

.product-actions {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.25s;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.quick-view, .add-to-wishlist {
    background-color: white;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.15s;
}

.quick-view:hover, .add-to-wishlist:hover {
    transform: scale(1.1);
}

.product-content {
    padding: var(--spacing-md);
}

.product-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stars {
    color: var(--warning-color);
    font-size: 0.875rem;
}

.rating-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-sm);
}

.current-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
}

.original-price {
    font-size: 0.875rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s;
}

.add-to-cart-btn:hover {
    background-color: var(--primary-dark);
}

/* Newsletter */
.newsletter-section {
    background-color: var(--primary-color);
    color: white;
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.newsletter-content h2 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.newsletter-content p {
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--spacing-lg);
}

.newsletter-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    gap: var(--spacing-sm);
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius-md);
}

/* Features */
.features-section {
    padding: var(--spacing-xl) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.feature-item {
    text-align: center;
    padding: var(--spacing-lg);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.feature-item h3 {
    margin-bottom: var(--spacing-sm);
}

/* Shop */
.shop-section {
    padding: var(--spacing-xl) 0;
}

.shop-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

/* Contact */
.contact-section {
    padding: var(--spacing-xl) 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.contact-methods {
    margin: var(--spacing-lg) 0;
}

.contact-method {
    margin-bottom: var(--spacing-md);
}

.contact-method h3 {
    margin-bottom: 0.5rem;
}

.contact-form-wrapper {
    background-color: var(--background-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* About */
.about-content {
    padding: var(--spacing-xl) 0;
}

.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

/* Privacy */
.privacy-content {
    padding: var(--spacing-xl) 0;
    max-width: 800px;
    margin: 0 auto;
}

.privacy-section {
    margin-bottom: var(--spacing-xl);
}

/* Footer */
.footer {
    background-color: #111827;
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    margin-bottom: var(--spacing-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.8);
    transition: color 0.15s;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-links a {
    color: rgba(255,255,255,0.8);
    transition: color 0.15s;
    font-size: 1.2rem;
}

.social-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: rgba(255,255,255,0.6);
}

.payment-icons {
    display: flex;
    gap: 0.5rem;
}

.payment-icon {
    font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--background-color);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .search-bar {
        order: 3;
        width: 100%;
        margin-top: var(--spacing-sm);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .about-intro {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

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

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

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



/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 20px;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 300px;
}

.cookie-content a {
    color: #4CAF50;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

.cookie-actions button {
    padding: 10px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-accept {
    background: #4CAF50;
    color: white;
}

.btn-accept:hover {
    background: #45a049;
}

.btn-decline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-decline:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   AUTO-FIX: Color Contrast for Dark Backgrounds
   ============================================ */

/* Ensure text is visible on any dark background */
.bg-gray-800,
.bg-gray-900, 
.bg-dark,
[class*="bg-gray-8"],
[class*="bg-gray-9"],
[style*="background: #1f2937"],
[style*="background-color: #111827"],
[style*="background: #374151"],
[style*="background-color: #374151"] {
    color: #f9fafb !important;
}

/* All child elements inherit the light color */
.bg-gray-800 *,
.bg-gray-900 *,
.bg-dark *,
[class*="bg-gray-8"] *,
[class*="bg-gray-9"] *,
[style*="background: #1f2937"] *,
[style*="background-color: #111827"] *,
[style*="background: #374151"] *,
[style*="background-color: #374151"] * {
    color: inherit;
}

/* Headers on dark backgrounds should be white */
.bg-gray-800 h1, .bg-gray-800 h2, .bg-gray-800 h3, .bg-gray-800 h4,
.bg-gray-900 h1, .bg-gray-900 h2, .bg-gray-900 h3, .bg-gray-900 h4,
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4,
[class*="bg-gray-8"] h1, [class*="bg-gray-8"] h2, [class*="bg-gray-8"] h3,
[class*="bg-gray-9"] h1, [class*="bg-gray-9"] h2, [class*="bg-gray-9"] h3 {
    color: #ffffff !important;
}

/* Links on dark backgrounds */
.bg-gray-800 a, .bg-gray-900 a, .bg-dark a {
    color: #60a5fa !important;
}

.bg-gray-800 a:hover, .bg-gray-900 a:hover, .bg-dark a:hover {
    color: #93c5fd !important;
}

/* Ensure icons/SVGs are visible */
.bg-gray-800 svg, .bg-gray-900 svg, .bg-dark svg {
    fill: currentColor;
    stroke: currentColor;
}


/* Theme styles */
/* Modern Theme for Blog Template */
/* Clean, minimal design with bright colors */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-color: #111827;
    --text-light: #6b7280;
    --background-color: #ffffff;
    --background-light: #f8fafc;
    --border-color: #e5e7eb;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Modern theme specific styles */
body {
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.btn {
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-weight: 500;
    letter-spacing: 0.025em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--background-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.post-card {
    border: none;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    border-radius: var(--radius-lg);
}

.post-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    transform: translateY(-4px);
}

.category-card {
    border: none;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    border-radius: var(--radius-lg);
}

.category-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    transform: translateY(-4px);
}

.hero {
    background: linear-gradient(135deg, var(--background-light) 0%, var(--background-color) 100%);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.footer {
    background: linear-gradient(135deg, var(--text-color) 0%, #111827 100%);
    color: white;
}

.footer-content h3,
.footer-content h4,
.footer-content p,
.footer-content ul li a {
    color: rgba(255, 255, 255, 0.9);
}

.footer-content ul li a:hover {
    color: white;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
}
