:root {
    --primary: #1a4d2e;
    --primary-light: #2d8a4e;
    --primary-dark: #143b23;
    --accent: #4caf50;
    --bg-light: #f8faf8;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    background: #fff;
    overflow-x: hidden;
}

/* Top Bar */
.top-bar {
    font-size: 0.8rem;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}
.top-bar .top-bar-track {
    display: inline-flex;
    gap: 4rem;
    position: relative;
}
.top-bar .top-bar-track span {
    display: inline-flex; align-items: center; gap: 0.3rem;
}
.top-bar-icon-truck { color: #ff9800; }
.top-bar-icon-undo { color: #4caf50; }
.top-bar-icon-tag { color: #e91e63; }
.top-bar-code {
    background: rgba(255,255,255,0.2); padding: 0.1rem 0.5rem; border-radius: 4px;
    font-weight: 600; letter-spacing: 0.5px;
}
.bg-dark-green { background: var(--primary) !important; }
.bg-light-green { background: #e8f5e9; }
.text-white-50 { color: rgba(255,255,255,0.65) !important; }
.border-white-10 { border-color: rgba(255,255,255,0.1) !important; }
.hover-green:hover { color: var(--accent) !important; }

/* Navbar */
.navbar { padding: 0.75rem 0; transition: var(--transition); }
.navbar .nav-link { color: rgba(255,255,255,0.85) !important; font-weight: 500; padding: 0.5rem 1rem !important; font-size: 0.9rem; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: #fff !important; }
.navbar .navbar-toggler { border-color: rgba(255,255,255,0.3); }
.navbar .navbar-toggler:focus { box-shadow: none; }

/* Hero Slider */
.hero-slider .swiper { height: 550px; }
.hero-slide { height: 550px; display: flex; align-items: center; position: relative; overflow: hidden; }
.hero-slide .hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    animation: heroZoom 8s ease-in-out forwards;
}
.swiper-slide-active .hero-bg { animation: heroZoom 8s ease-in-out forwards; }
@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}
.hero-content { max-width: 700px; margin: 0 auto; position: relative; z-index: 1; }
.hero-content h1 { text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.hero-content p { text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.hero-content .hero-title {
    animation: heroFadeDown 1s ease both;
}
.hero-content .hero-subtitle {
    animation: heroFadeUp 1s 0.3s ease both;
}
.hero-content .hero-btn {
    animation: heroFadeUp 1s 0.6s ease both;
}
@keyframes heroFadeDown {
    0% { opacity: 0; transform: translateY(-40px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}
.hero-slider .swiper-button-next, .hero-slider .swiper-button-prev { color: #fff; background: rgba(0,0,0,0.3); width: 50px; height: 50px; border-radius: 50%; backdrop-filter: blur(4px); transition: var(--transition); }
.hero-slider .swiper-button-next:hover, .hero-slider .swiper-button-prev:hover { background: rgba(0,0,0,0.6); transform: scale(1.1); }
.hero-slider .swiper-button-next::after, .hero-slider .swiper-button-prev::after { font-size: 1.2rem; }
.hero-slider .swiper-pagination-bullet { width: 12px; height: 12px; background: rgba(255,255,255,0.5); transition: var(--transition); }
.hero-slider .swiper-pagination-bullet-active { background: #fff; width: 30px; border-radius: 6px; }

/* Section */
.section-padding { padding: 4rem 0; }

/* Category Card */
.category-card { transition: var(--transition); border: 1px solid var(--border); }
.category-card:hover { transform: translateY(-5px) scale(1.03); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.category-card img { transition: transform 0.5s ease; }
.category-card:hover img { transform: scale(1.1); }

/* Product Card */
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; transition: var(--transition); border: 1px solid var(--border); height: 100%; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.product-image { position: relative; overflow: hidden; height: 220px; display: flex; align-items: center; justify-content: center; background: #f8faf8; padding: 1rem; }
.product-image img { max-height: 180px; object-fit: contain; transition: transform 0.4s ease; }
.product-card:hover .product-image img { transform: scale(1.08); }
.product-badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.product-wishlist { position: absolute; top: 10px; right: 10px; z-index: 2; background: #fff; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.1); cursor: pointer; transition: var(--transition); }
.product-wishlist:hover { background: #fce4ec; color: #e91e63; }
.product-body { padding: 1rem; }
.product-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-title a { color: var(--text-dark); text-decoration: none; }
.product-title a:hover { color: var(--primary); }
.product-price { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.product-price .original { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; font-weight: 400; }
.product-rating { font-size: 0.8rem; }
.add-to-cart-btn { width: 100%; border-radius: 8px; font-weight: 600; font-size: 0.85rem; padding: 0.5rem; }

/* Testimonials */
.testimonial-card { transition: var(--transition); }
.testimonial-card:hover { transform: translateY(-3px); }
.testimonialSwiper .swiper-pagination { position: relative; }

/* Promo Banner */
.promo-banner { min-height: 280px; }

/* Newsletter */
.newsletter-section { padding: 5rem 0; }
.newsletter-section .form-control:focus { box-shadow: none; border-color: var(--accent); }

/* WhatsApp Float */
.whatsapp-float { position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; background: #25d366; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 4px 16px rgba(37,211,102,0.4); z-index: 999; text-decoration: none; transition: var(--transition); }
.whatsapp-float:hover { transform: scale(1.1); color: #fff; background: #20bd5a; }

/* Footer */
footer a { transition: var(--transition); }
footer a:hover { color: var(--accent) !important; padding-left: 3px; }

/* Auth Pages */
.auth-section { min-height: calc(100vh - 200px); display: flex; align-items: center; }
.auth-card { border: none; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Shop Filters */
.filter-section { background: #fff; border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--border); }
.filter-section h6 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.price-range-slider { width: 100%; }

/* Cart Page */
.cart-item { background: #fff; border-radius: var(--radius); padding: 1rem; border: 1px solid var(--border); transition: var(--transition); }
.cart-item:hover { box-shadow: var(--shadow); }
.quantity-input { width: 60px; text-align: center; border: 1px solid var(--border); border-radius: 6px; padding: 0.35rem; }

/* Blog */
.blog-card { background: #fff; border-radius: var(--radius); overflow: hidden; transition: var(--transition); border: 1px solid var(--border); }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

/* 404 */
.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; }

/* Product Detail */
.product-gallery { position: relative; }
.product-gallery .main-image { border-radius: var(--radius); background: #f8faf8; padding: 2rem; text-align: center; position: relative; }
.product-gallery .main-image img { max-height: 400px; object-fit: contain; }
.zoom-wrap { position: relative; display: inline-block; cursor: zoom-in; }
.zoom-lens { position: absolute; display: none; border: 2px solid var(--primary); background: rgba(255,255,255,0.2); pointer-events: none; z-index: 5; border-radius: 4px; }
.zoom-result { position: absolute; top: 0; left: calc(100% + 20px); width: 400px; height: 400px; border: 2px solid #dee2e6; background-repeat: no-repeat; background-color: #fff; display: none; z-index: 10; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
@media (max-width: 1200px) { .zoom-result { width: 300px; height: 300px; } }
@media (max-width: 992px) { .zoom-result { display: none !important; } .zoom-lens { display: none !important; } }
.product-thumbs { display: flex; gap: 0.5rem; margin-top: 1rem; }
.product-thumbs .thumb { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; padding: 0.5rem; background: #f8faf8; display: flex; align-items: center; justify-content: center; }
.product-thumbs .thumb.active { border-color: var(--primary); }
.product-thumbs .thumb img { max-height: 60px; object-fit: contain; }
.product-info h1 { font-size: 1.75rem; font-weight: 700; }
.product-info .price-display { font-size: 1.75rem; font-weight: 800; color: var(--primary); }

/* Responsive */
@media (max-width: 992px) {
    .hero-slider .swiper, .hero-slide { height: 400px; }
    .hero-content h1 { font-size: 2rem; }
    .section-padding { padding: 3rem 0; }
}
@media (max-width: 768px) {
    .hero-slider .swiper, .hero-slide { height: 320px; }
    .hero-content h1 { font-size: 1.5rem; }
    .hero-content p { font-size: 0.9rem; }
    .hero-content .btn { padding: 0.5rem 1.5rem; font-size: 0.9rem; }
    .section-padding { padding: 2rem 0; }
    .product-image { height: 160px; }
    .product-image img { max-height: 130px; }
    .whatsapp-float { width: 46px; height: 46px; font-size: 1.25rem; bottom: 16px; right: 16px; }
}
@media (max-width: 576px) {
    .hero-slider .swiper, .hero-slide { height: 250px; }
    .top-bar { font-size: 0.7rem; }
    .top-bar .container { flex-direction: column; gap: 2px; }
}

/* Utility */
.fw-medium { font-weight: 500 !important; }
.opacity-90 { opacity: 0.9; }

/* Image lazy loading */
img[loading="lazy"] { transition: opacity 0.3s; }
img[loading="lazy"].loaded { opacity: 1; }
