/* Base CSS */
:root {
    /* Colors */
    --primary-color: #FFB300; /* Honey yellow */
    --primary-color-rgb: 228, 168, 28;
    --secondary-color: #E68A00; /* Darker honey orange */
    --accent-color: #FFF8E1; /* Light cream, like honeycomb */
   
    --text-light: #795548; /* Lighter brown */
    --white-color: #FFFFFF;
    --black-color: #000000;
    --border-color: #E0E0E0;
    --light-bg: #FFFDF5; /* Very light yellow background */

    /* Dark Theme Colors */
    --dark-bg-color: #1f1b18; /* Darker, earthy brown */
    --dark-surface-color: #2c2521; /* Slightly lighter for cards/surfaces */
    --dark-text-color: #f5f5f5; /* Off-white for text */
    --dark-text-light: #bdbdbd; /* Lighter grey for secondary text */
    --dark-border-color: #4e4037; /* Darker border */
    --dark-primary-hover: #ffc107; /* Brighter yellow for hover in dark mode */

    /* Typography */
    --font-primary: 'Poppins', sans-serif; /* A modern, friendly font */
    --font-secondary: 'Lora', serif; /* For headings, adds a touch of elegance */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Spacing */
    --container-padding: 0 20px;
    --section-spacing: 80px;
    --header-height: 80px;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition-fast: all 0.2s ease-in-out;
    --transition-normal: all 0.3s ease-in-out;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

body.dark-theme {
    --text-color: var(--dark-text-color);
    --text-light: var(--dark-text-light);
    --white-color: var(--dark-surface-color); /* Redefine white for dark theme surfaces */
    --black-color: #ffffff; /* Redefine black for dark theme text if needed, though --dark-text-color is primary */
    --border-color: var(--dark-border-color);
    --light-bg: var(--dark-bg-color); /* Use dark-bg for elements that were light-bg */
    /* Specific component colors that need to adapt */
    --accent-color: #4e4037; /* Darker accent for dark mode, or choose a contrasting one */

    background-color: var(--dark-bg-color);
    color: var(--dark-text-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    color: var(--text-color); /* Will adapt with body.dark-theme */
    line-height: 1.3;
    margin-bottom: 0.75em;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.8rem;
}

h4 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1em;
    color: var(--text-color); /* Ensure p tags also adapt */
}

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

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

body.dark-theme a {
    color: var(--primary-color); /* Make links stand out more in dark theme */
}

body.dark-theme a:hover {
    color: var(--dark-primary-hover);
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.hidden { display: none !important; }
.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }
.pb-1 { padding-bottom: 1rem; }
.pb-2 { padding-bottom: 2rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-light); /* Use text-light for labels */
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md); /* Consistent border radius */
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background-color: var(--white-color); /* Form input background */
    color: var(--text-color); /* Form input text color */
}

body.dark-theme .form-group input[type="text"],
body.dark-theme .form-group input[type="email"],
body.dark-theme .form-group input[type="tel"],
body.dark-theme .form-group input[type="password"],
body.dark-theme .form-group input[type="number"],
body.dark-theme .form-group textarea,
body.dark-theme .form-group select {
    background-color: var(--dark-surface-color); 
    color: var(--dark-text-color);
    border-color: var(--dark-border-color);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

body.dark-theme .form-group input:focus,
body.dark-theme .form-group textarea:focus,
body.dark-theme .form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.4);
}

/* Page Banner (Common style for shop, blog, contact etc.) */
.page-banner {
    background-color: var(--light-bg); /* Use variable */
    padding: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--primary-color);
}

body.dark-theme .page-banner {
    background-color: var(--dark-surface-color); /* Darker banner bg */
    border-bottom-color: var(--primary-color); /* Keep primary color for accent */
}

.page-banner::before { /* Optional decorative element */
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    width: 150px;
    height: 100px;
    background: var(--primary-color);
    opacity: 0.1;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 0;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-content h1 {
    font-size: 2.8rem;
    color: var(--secondary-color); /* Adapts with body.dark-theme if secondary-color is not hardcoded */
    margin-bottom: 10px;
}
body.dark-theme .banner-content h1 {
    color: var(--primary-color); /* Brighter for dark theme */
}

.banner-subtitle {
    font-size: 1.1rem;
    color: var(--text-light); /* Adapts */
    margin-bottom: 20px;
}

.breadcrumb {
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--secondary-color); /* Adapts */
    transition: color var(--transition-fast);
}
body.dark-theme .breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}
body.dark-theme .breadcrumb a:hover {
    color: var(--dark-primary-hover);
}

.breadcrumb .separator {
    margin: 0 8px;
    color: var(--text-light); /* Adapts */
}

.breadcrumb .current {
    color: var(--text-color); /* Adapts */
    font-weight: bold;
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--text-color); /* Adapts */
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Main Styling */

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.95); /* Light theme header */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

body.dark-theme .header {
    background-color: rgba(var(--dark-surface-color-rgb), 0.95); /* Dark theme header, assuming --dark-surface-color-rgb is defined */
    /* If --dark-surface-color is hex, convert to RGB for rgba or use a solid color */
    /* background-color: var(--dark-surface-color); /* Simpler: solid color */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Darker shadow for dark theme */
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body.dark-theme .header.scrolled {
    background-color: rgba(var(--dark-surface-color-rgb), 0.98);
    /* background-color: var(--dark-surface-color); */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    position: relative;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-color); /* Adapts */
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}
body.dark-theme .nav-link:hover, body.dark-theme .nav-link.active {
    color: var(--dark-primary-hover);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}
body.dark-theme .nav-link.active::after {
    background-color: var(--dark-primary-hover);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white-color); /* Adapts */
    box-shadow: var(--box-shadow);
    min-width: 180px;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(10px);
    z-index: 100;
    border: 1px solid var(--border-color); /* Add border for definition */
}

/* ... dropdown:hover .dropdown-menu ... */

.dropdown-menu li {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color); /* Adapts */
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    display: block;
    color: var(--text-color); /* Adapts */
    font-size: 0.95rem;
}

.dropdown-menu li a:hover {
    color: var(--primary-color);
}
body.dark-theme .dropdown-menu li a:hover {
    color: var(--dark-primary-hover);
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo img {
    max-height: 70px;
}

.right-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hotline {
    font-weight: 500;
    color: var(--text-color); /* Adapts */
}

.phone {
    color: var(--primary-color);
    font-weight: 700;
}
body.dark-theme .phone {
    color: var(--dark-primary-hover);
}

.user-account,
.search,
.cart {
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    color: var(--text-color); /* Adapts */
}

.user-account:hover,
.search:hover,
.cart:hover {
    color: var(--primary-color);
}
body.dark-theme .user-account:hover,
body.dark-theme .search:hover,
body.dark-theme .cart:hover {
    color: var(--dark-primary-hover);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: var(--text-color); /* Dark text on yellow */
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}
body.dark-theme .cart-count {
    color: #333; /* Ensure dark text */
}

/* Footer */
.footer {
    background-color: #2c2c2c; /* Keep dark for both themes or adjust if needed */
    color: #ccc; /* Default light text for dark footer */
    padding: 50px 0 30px;
}

body.dark-theme .footer {
    background-color: #1a1a1a; /* Even darker for dark theme footer */
    color: var(--dark-text-light); /* Use dark theme's light text */
}

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

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}
body.dark-theme .footer-section h4 {
    color: var(--dark-primary-hover);
}

/* ... footer-logo ... */

.company-info p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #ccc; /* Default */
}
body.dark-theme .company-info p {
    color: var(--dark-text-light);
}

.hotline-footer {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}
body.dark-theme .hotline-footer {
    color: var(--dark-primary-hover);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc; /* Default */
    transition: color 0.3s ease;
}
body.dark-theme .footer-links a {
    color: var(--dark-text-light);
}

.footer-links a:hover {
    color: var(--primary-color);
}
body.dark-theme .footer-links a:hover {
    color: var(--dark-primary-hover);
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.payment-methods img {
    height: 30px;
    width: auto;
    border-radius: 4px;
    background: #fff; /* Keep background white for logos or make it transparent */
    padding: 5px;
}
body.dark-theme .payment-methods img {
    background: var(--dark-text-light); /* Light background for visibility in dark mode */
}

/* Add a placeholder for --dark-surface-color-rgb if not defined elsewhere */
/* This is just for the rgba() in header. If you use solid color, this is not needed. */
/* Example: --dark-surface-color-rgb: 44, 37, 33; /* Corresponding to #2c2521 */

/* Ensure you define --dark-surface-color-rgb if you use it in rgba() for .header */
/* For example, if --dark-surface-color: #2c2521; then --dark-surface-color-rgb: 44, 37, 33; */
/* Add this to the :root or body.dark-theme block */
body.dark-theme {
    /* ... other dark theme variables ... */
    --dark-surface-color-rgb: 44, 37, 33; /* Example, adjust if your color is different */
}

/* Add FontAwesome if not already included in HTML */
/* @import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css'); */
/* Add Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');
