/* ============================================================
   FreshMart — Modern Grocery Store (Website 1)
   CSS Author: Senior Front-End Developer
   Version: 1.0.0
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary: #FF6F00;
    --secondary-light: #FFA000;
    --accent: #E8F5E9;
    --white: #ffffff;
    --light: #F9FBF9;
    --gray-100: #F5F5F5;
    --gray-200: #E8E8E8;
    --gray-400: #BDBDBD;
    --gray-600: #757575;
    --dark: #1A1A1A;
    --text: #333333;
    --text-muted: #6C757D;
    --border: #E0E0E0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --font: 'Poppins', sans-serif;
}

/* ── Dark Mode Variables ── */
body.dark-mode {
    --white: #1E1E1E;
    --light: #121212;
    --gray-100: #252525;
    --gray-200: #333333;
    --dark: #F5F5F5;
    --text: #E0E0E0;
    --text-muted: #9E9E9E;
    --border: #333333;
    --accent: #1B2E1C;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Preloader ── */
#preloader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--white);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.4s, visibility 0.4s;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-inner {
    text-align: center;
    animation: pulse 1s ease-in-out infinite alternate;
}
.preloader-inner .logo-text { font-size: 2rem; font-weight: 800; color: var(--primary); }
.preloader-spinner {
    width: 50px; height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 10px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { from { opacity: 0.7; } to { opacity: 1; } }

/* ── Toast Notification ── */
.toast-notification {
    position: fixed; bottom: 30px; right: 30px; z-index: 9998;
    background: var(--primary); color: #fff;
    padding: 14px 22px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500;
    display: flex; align-items: center; gap: 10px;
    transform: translateX(110%); transition: transform 0.35s ease;
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.35);
}
.toast-notification.show { transform: translateX(0); }
.toast-notification i { font-size: 1.1rem; }

/* ── Navbar ── */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: var(--white);
    padding: 0 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.12); }

.navbar-top {
    background: var(--primary);
    color: var(--white);
    font-size: 0.82rem;
    padding: 6px 0;
}
.navbar-top a { color: rgba(255,255,255,0.85); }
.navbar-top a:hover { color: #fff; }

.navbar-main {
    padding: 14px 0;
}
.navbar-brand .brand-logo {
    font-size: 1.65rem; font-weight: 800;
    color: var(--primary); line-height: 1;
}
.navbar-brand .brand-logo span { color: var(--secondary); }
.navbar-brand small {
    font-size: 0.65rem; color: var(--text-muted);
    letter-spacing: 1.5px; text-transform: uppercase;
    display: block; margin-top: 2px;
}

.search-form { flex: 1; max-width: 500px; }
.search-form .input-group { border-radius: 30px; overflow: hidden; border: 2px solid var(--primary); }
.search-form input {
    border: none; padding: 10px 18px; font-size: 0.9rem;
    background: var(--white); color: var(--text);
}
.search-form input:focus { outline: none; box-shadow: none; }
.search-form .btn-search {
    background: var(--primary); color: #fff;
    border: none; padding: 10px 20px; cursor: pointer;
    transition: var(--transition);
}
.search-form .btn-search:hover { background: var(--primary-dark); }

.nav-icons { display: flex; align-items: center; gap: 8px; }
.nav-icon-btn {
    position: relative;
    background: var(--gray-100); border: none; cursor: pointer;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: var(--text);
    transition: var(--transition);
}
.nav-icon-btn:hover { background: var(--primary); color: #fff; }
.cart-count, .wishlist-count {
    position: absolute; top: -4px; right: -4px;
    background: var(--secondary); color: #fff;
    font-size: 0.65rem; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

.navbar-nav .nav-link {
    font-weight: 500; font-size: 0.92rem; color: var(--text) !important;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--primary) !important; background: var(--accent); }

.navbar-nav .nav-item.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu {
    border: none; border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    background: var(--white);
    padding: 10px;
    animation: fadeDown 0.2s ease;
}
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-item {
    border-radius: var(--radius-sm); font-size: 0.88rem;
    padding: 8px 14px; color: var(--text); font-weight: 500;
}
.dropdown-item:hover { background: var(--accent); color: var(--primary); }

/* ── Hero Section ── */
.hero-section {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 40%, #388E3C 70%, #43A047 100%);
    min-height: 90vh; display: flex; align-items: center;
    position: relative; overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute; inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.03)" d="M0,224L60,218.7C120,213,240,203,360,208C480,213,600,235,720,229.3C840,224,960,192,1080,181.3C1200,171,1320,181,1380,186.7L1440,192L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #fff; border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 16px; border-radius: 30px;
    font-size: 0.85rem; font-weight: 600;
    letter-spacing: 1px; text-transform: uppercase;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800; line-height: 1.15;
    color: #fff; margin-bottom: 20px;
}
.hero-title span { color: #FFF176; }
.hero-subtitle { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-bottom: 36px; }
.hero-offers {
    display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px;
}
.hero-offer-badge {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    color: #fff; padding: 8px 16px;
    border-radius: 30px; font-size: 0.82rem; font-weight: 600;
}
.hero-offer-badge i { color: #FFF176; margin-right: 6px; }
.hero-image-wrap {
    position: relative; text-align: center;
}
.hero-image-wrap img {
    max-height: 500px; width: auto;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.35));
    animation: heroFloat 3s ease-in-out infinite alternate;
    margin: 0 auto;
}
@keyframes heroFloat { from { transform: translateY(0); } to { transform: translateY(-18px); } }
.hero-stats {
    display: flex; gap: 24px; flex-wrap: wrap;
}
.hero-stat { color: #fff; }
.hero-stat strong { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1; }
.hero-stat span { font-size: 0.8rem; opacity: 0.8; }

/* ── Buttons ── */
.btn-primary-custom {
    background: var(--secondary); color: #fff;
    border: 2px solid var(--secondary);
    padding: 12px 32px; border-radius: 30px;
    font-weight: 600; font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; text-decoration: none;
}
.btn-primary-custom:hover {
    background: var(--secondary-light); border-color: var(--secondary-light);
    color: #fff; transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 111, 0, 0.4);
}
.btn-outline-custom {
    background: transparent; color: #fff;
    border: 2px solid rgba(255,255,255,0.6);
    padding: 12px 32px; border-radius: 30px;
    font-weight: 600; font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-custom:hover { background: #fff; color: var(--primary); }

.btn-green {
    background: var(--primary); color: #fff;
    border: 2px solid var(--primary);
    padding: 12px 32px; border-radius: 30px;
    font-weight: 600; font-size: 0.95rem;
    transition: var(--transition);
    display: inline-block; cursor: pointer;
}
.btn-green:hover {
    background: var(--primary-dark); border-color: var(--primary-dark);
    color: #fff; transform: translateY(-2px);
}
.btn-green-outline {
    background: transparent; color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 28px; border-radius: 30px;
    font-weight: 600; font-size: 0.9rem;
    transition: var(--transition); display: inline-block;
}
.btn-green-outline:hover { background: var(--primary); color: #fff; }

/* ── Section Headers ── */
.section-header { margin-bottom: 50px; }
.section-tag {
    display: inline-block;
    background: var(--accent);
    color: var(--primary);
    font-size: 0.8rem; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    padding: 6px 16px; border-radius: 30px;
    margin-bottom: 14px;
    border: 1px solid rgba(46, 125, 50, 0.2);
}
.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800; color: var(--dark); line-height: 1.2;
    margin-bottom: 14px;
}
.section-title span { color: var(--primary); }
.section-desc { color: var(--text-muted); font-size: 1rem; max-width: 550px; }

/* ── Categories Section ── */
.categories-section { padding: 80px 0; background: var(--light); }
.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: var(--shadow);
}
.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.category-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
    transition: var(--transition);
}
.category-card:hover .category-icon { background: var(--primary); color: #fff; }
.category-card h5 {
    font-size: 0.95rem; font-weight: 700;
    color: var(--dark); margin-bottom: 4px;
}
.category-card span { font-size: 0.8rem; color: var(--text-muted); }

/* ── Products Section ── */
.products-section { padding: 80px 0; }

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    height: 100%;
    display: flex; flex-direction: column;
}
.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
    border-color: transparent;
}
.product-badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    font-size: 0.72rem; font-weight: 700;
    padding: 4px 10px; border-radius: 20px;
    letter-spacing: 0.5px; text-transform: uppercase;
}
.badge-sale { background: #FF3D3D; color: #fff; }
.badge-new { background: #2196F3; color: #fff; }
.badge-organic { background: #4CAF50; color: #fff; }

.product-image {
    position: relative; overflow: hidden;
    aspect-ratio: 1; background: var(--gray-100);
}
.product-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-image img { transform: scale(1.08); }

.product-actions {
    position: absolute; top: 12px; right: 12px;
    display: flex; flex-direction: column; gap: 8px;
    opacity: 0; transform: translateX(12px);
    transition: var(--transition);
}
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }
.btn-wishlist, .btn-quick-view {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; color: var(--text-muted);
    cursor: pointer; transition: var(--transition);
    text-decoration: none;
}
.btn-wishlist:hover, .btn-wishlist.active { background: #FF3D3D; color: #fff; border-color: #FF3D3D; }
.btn-quick-view:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-wishlist.active { background: #FF3D3D; color: #fff; border-color: #FF3D3D; }

.product-info { padding: 16px 16px 8px; flex: 1; }
.product-category {
    font-size: 0.72rem; font-weight: 600;
    color: var(--primary); text-transform: uppercase;
    letter-spacing: 1px;
}
.product-title { font-size: 0.95rem; font-weight: 600; margin: 6px 0 8px; line-height: 1.35; }
.product-title a { color: var(--dark); }
.product-title a:hover { color: var(--primary); }
.product-rating { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; margin-bottom: 10px; }
.product-rating .fa-star, .product-rating .fa-star-half-alt { color: #FB8C00; }
.product-rating .fa-star.far { color: var(--gray-400); }
.review-count { color: var(--text-muted); font-size: 0.78rem; }
.product-price-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.product-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.product-original-price { font-size: 0.9rem; color: var(--text-muted); text-decoration: line-through; }
.product-discount { font-size: 0.75rem; font-weight: 700; color: #FF3D3D; }
.product-unit { font-size: 0.75rem; color: var(--text-muted); display: block; margin-top: 3px; }
.product-footer { padding: 12px 16px 16px; }
.btn-add-cart {
    background: var(--accent); color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 30px; padding: 10px 16px;
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-add-cart:hover { background: var(--primary); color: #fff; }

/* ── Offers Section ── */
.offers-section { padding: 80px 0; background: var(--light); }
.offer-card {
    border-radius: var(--radius);
    overflow: hidden; position: relative;
    min-height: 220px;
    display: flex; align-items: center;
    padding: 36px;
    background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
}
.offer-card.offer-orange {
    background: linear-gradient(120deg, #E65100 0%, #FF6F00 100%);
}
.offer-card-tag {
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    opacity: 0.85; margin-bottom: 10px;
}
.offer-card h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.offer-card p { opacity: 0.85; margin-bottom: 20px; }
.offer-card .discount-value {
    font-size: 3.5rem; font-weight: 900;
    position: absolute; right: 30px; top: 50%;
    transform: translateY(-50%); opacity: 0.15;
    line-height: 1;
}
.countdown-wrap { margin: 20px 0; }
.countdown-label {
    font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 1px; opacity: 0.8; margin-bottom: 8px;
}
.countdown-boxes { display: flex; gap: 10px; }
.cd-box {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 8px; padding: 10px 14px;
    text-align: center; min-width: 56px;
}
.cd-box .cd-num { font-size: 1.6rem; font-weight: 800; line-height: 1; display: block; }
.cd-box .cd-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }

/* ── Why Choose Us ── */
.whychoose-section { padding: 80px 0; }
.feature-card {
    text-align: center; padding: 36px 24px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}
.feature-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem; color: var(--primary);
    transition: var(--transition);
}
.feature-card:hover .feature-icon { background: var(--primary); color: #fff; }
.feature-card h5 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; color: var(--dark); }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ── Stats Section ── */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
}
.stat-card { text-align: center; }
.stat-card .counter-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900; line-height: 1;
    margin-bottom: 8px; display: block;
}
.stat-card .stat-suffix {
    font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 900;
}
.stat-card p { font-size: 0.95rem; opacity: 0.85; }

/* ── Testimonials ── */
.testimonials-section { padding: 80px 0; background: var(--light); }
.testimonial-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid var(--border);
    position: relative;
    transition: var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.testimonial-card::before {
    content: '\201C';
    font-size: 5rem; color: var(--accent);
    font-family: Georgia, serif; line-height: 0.6;
    position: absolute; top: 20px; left: 24px;
    color: var(--primary); opacity: 0.15;
}
.testimonial-text { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }
.testimonial-avatar {
    width: 50px; height: 50px; border-radius: 50%;
    object-fit: cover; border: 3px solid var(--accent);
}
.testimonial-name { font-weight: 700; font-size: 0.95rem; color: var(--dark); }
.testimonial-role { font-size: 0.78rem; color: var(--text-muted); }
.testimonial-rating { display: flex; gap: 3px; margin-top: 4px; font-size: 0.75rem; color: #FB8C00; }

/* ── Newsletter ── */
.newsletter-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #388E3C, #1B5E20);
}
.newsletter-inner { max-width: 600px; margin: 0 auto; text-align: center; }
.newsletter-section h2 { color: #fff; font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.newsletter-section p { color: rgba(255,255,255,0.85); margin-bottom: 30px; }
.newsletter-form { display: flex; gap: 0; border-radius: 50px; overflow: hidden; }
.newsletter-form input {
    flex: 1; border: none; padding: 16px 24px;
    font-size: 0.95rem; outline: none;
    background: rgba(255,255,255,0.95);
}
.newsletter-form button {
    background: var(--secondary); color: #fff;
    border: none; padding: 16px 28px;
    font-weight: 700; font-size: 0.9rem;
    cursor: pointer; transition: var(--transition);
    white-space: nowrap;
}
.newsletter-form button:hover { background: var(--secondary-light); }
.newsletter-success {
    color: #fff; font-size: 1.1rem; font-weight: 600;
    padding: 20px; text-align: center;
}
.newsletter-success i { font-size: 1.5rem; margin-right: 8px; }

/* ── Shop Page ── */
.shop-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 50px 0; color: #fff;
}
.shop-hero h1 { font-size: 2.2rem; font-weight: 800; }
.breadcrumb { background: none; padding: 0; margin-top: 10px; }
.breadcrumb-item a { color: rgba(255,255,255,0.75); }
.breadcrumb-item a:hover { color: #fff; }
.breadcrumb-item.active { color: rgba(255,255,255,0.9); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

.shop-sidebar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    position: sticky; top: 100px;
}
.sidebar-section { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.sidebar-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sidebar-title { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 16px; }

.filter-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.filter-item label { cursor: pointer; font-size: 0.9rem; color: var(--text); flex: 1; }
.filter-item input[type="checkbox"] {
    width: 18px; height: 18px; border-radius: 4px;
    accent-color: var(--primary); cursor: pointer;
}
.filter-count { font-size: 0.77rem; color: var(--text-muted); }

.price-range-wrap { margin-top: 10px; }
#price-range {
    width: 100%; accent-color: var(--primary);
    cursor: pointer;
}
#price-range-display { font-size: 0.88rem; color: var(--primary); font-weight: 600; margin-top: 6px; }

.shop-toolbar {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px; background: var(--white);
    border-radius: var(--radius); border: 1px solid var(--border);
    margin-bottom: 24px; flex-wrap: wrap;
}
#product-count { font-size: 0.9rem; color: var(--text-muted); margin-right: auto; }
#sort-select, #shop-search {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 8px 14px; font-size: 0.88rem; color: var(--text);
    background: var(--white); outline: none;
}
#shop-search { min-width: 180px; }
#sort-select:focus, #shop-search:focus { border-color: var(--primary); }

/* ── Product Detail Page ── */
.gallery-main {
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); aspect-ratio: 1;
    background: var(--gray-100);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb {
    width: 70px; height: 70px; border-radius: var(--radius-sm);
    border: 2px solid var(--border); cursor: pointer; overflow: hidden;
    transition: var(--transition);
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-detail-title { font-size: 1.8rem; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.price-current { font-size: 2rem; font-weight: 900; color: var(--primary); }
.price-original { font-size: 1.2rem; color: var(--text-muted); text-decoration: line-through; }
.price-save {
    background: #FF3D3D; color: #fff;
    font-size: 0.8rem; font-weight: 700;
    padding: 3px 10px; border-radius: 20px;
}
.product-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; }
.product-meta p { font-size: 0.9rem; margin-bottom: 6px; color: var(--text-muted); }
.product-meta strong { color: var(--dark); }
.product-meta a { color: var(--primary); }

.qty-control {
    border: 2px solid var(--border); border-radius: 30px; overflow: hidden;
}
.qty-btn {
    width: 40px; height: 44px; background: var(--white);
    border: none; font-size: 1.1rem; font-weight: 700;
    cursor: pointer; color: var(--primary);
    transition: var(--transition);
}
.qty-btn:hover { background: var(--primary); color: #fff; }
.qty-input {
    width: 56px; height: 44px; border: none;
    text-align: center; font-size: 1rem; font-weight: 600;
    color: var(--dark); background: var(--white);
    padding: 0; outline: none;
}

.btn-wishlist-lg {
    width: 48px; height: 48px; border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--white); color: var(--text-muted);
    font-size: 1.1rem; cursor: pointer;
    transition: var(--transition);
    display: inline-flex; align-items: center; justify-content: center;
}
.btn-wishlist-lg:hover, .btn-wishlist-lg.active { border-color: #FF3D3D; background: #FF3D3D; color: #fff; }

/* ── Cart Page ── */
.cart-table thead th {
    background: var(--light); font-size: 0.85rem;
    font-weight: 700; color: var(--dark);
    padding: 14px 16px; border: none;
}
.cart-table tbody td { padding: 16px; vertical-align: middle; border-color: var(--border); }
.cart-table tbody tr:hover { background: var(--light); }
.btn-remove-cart {
    background: none; border: none; color: var(--text-muted);
    font-size: 1.1rem; cursor: pointer; transition: var(--transition);
    padding: 6px;
}
.btn-remove-cart:hover { color: #FF3D3D; }

.cart-summary-card {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 28px;
    position: sticky; top: 100px;
}
.cart-summary-card h4 { font-size: 1.15rem; font-weight: 800; margin-bottom: 20px; color: var(--dark); }
.summary-row {
    display: flex; justify-content: space-between;
    font-size: 0.92rem; margin-bottom: 12px; color: var(--text-muted);
}
.summary-row.total {
    font-size: 1.1rem; font-weight: 800; color: var(--dark);
    border-top: 2px solid var(--border); padding-top: 16px; margin-top: 6px;
}
#free-shipping-msg {
    font-size: 0.82rem; color: var(--primary);
    background: var(--accent); padding: 8px 12px;
    border-radius: var(--radius-sm); margin-bottom: 16px;
    display: none;
}

/* ── Checkout Page ── */
.checkout-card {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 28px;
    margin-bottom: 24px;
}
.checkout-card h5 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; color: var(--dark); }
.form-label { font-size: 0.88rem; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.form-control, .form-select {
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: 11px 14px; font-size: 0.9rem;
    background: var(--white); color: var(--text);
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
    outline: none;
}
.payment-option {
    border: 2px solid var(--border); border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex; align-items: center; gap: 12px;
    cursor: pointer; transition: var(--transition); margin-bottom: 12px;
}
.payment-option.active, .payment-option:hover { border-color: var(--primary); background: var(--accent); }
.payment-option input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; }
.payment-option label { cursor: pointer; font-weight: 600; font-size: 0.9rem; flex: 1; }

/* ── About Page ── */
.about-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 80px 0; color: #fff; text-align: center;
}
.about-hero h1 { font-size: 2.5rem; font-weight: 800; }
.about-section { padding: 80px 0; }
.about-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-hover); }
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.team-card {
    text-align: center; padding: 28px 20px;
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); transition: var(--transition);
}
.team-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-5px); }
.team-avatar {
    width: 100px; height: 100px; border-radius: 50%;
    object-fit: cover; margin: 0 auto 16px;
    border: 4px solid var(--accent);
}
.team-card h5 { font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.team-card p { font-size: 0.85rem; color: var(--primary); font-weight: 600; }
.team-social { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.team-social a {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; transition: var(--transition);
}
.team-social a:hover { background: var(--primary); color: #fff; }

/* ── Contact Page ── */
.contact-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 80px 0; color: #fff; text-align: center;
}
.contact-info-card {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 28px;
    text-align: center; transition: var(--transition);
}
.contact-info-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.contact-info-icon {
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--accent); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin: 0 auto 16px;
}
.contact-info-card h6 { font-weight: 700; margin-bottom: 6px; }
.contact-info-card p { font-size: 0.9rem; color: var(--text-muted); }
.contact-form-wrap {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 36px;
}
.map-placeholder {
    height: 380px; background: var(--gray-100);
    border-radius: var(--radius); overflow: hidden;
}
.map-placeholder iframe { width: 100%; height: 100%; border: none; }

/* ── Footer ── */
.footer {
    background: #0D1F0E;
    color: rgba(255,255,255,0.8);
    padding: 70px 0 0;
}
.footer-brand .brand-logo { font-size: 1.6rem; font-weight: 800; color: #fff; }
.footer-brand .brand-logo span { color: var(--secondary); }
.footer-brand p { font-size: 0.88rem; margin-top: 14px; opacity: 0.7; line-height: 1.7; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7); font-size: 0.9rem;
    transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer-heading {
    font-size: 1rem; font-weight: 700; color: #fff;
    margin-bottom: 20px;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255,255,255,0.65); font-size: 0.88rem;
    transition: var(--transition);
    display: flex; align-items: center; gap: 8px;
}
.footer-links a::before { content: '›'; color: var(--primary); font-size: 1rem; }
.footer-links a:hover { color: #fff; padding-left: 6px; }
.footer-contact li {
    display: flex; gap: 12px; margin-bottom: 14px;
    font-size: 0.88rem; color: rgba(255,255,255,0.65);
}
.footer-contact i { color: var(--primary); margin-top: 3px; flex-shrink: 0; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0; margin-top: 50px;
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; opacity: 0.6; margin: 0; }
.footer-payments { display: flex; gap: 8px; align-items: center; }
.footer-payments span {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    padding: 4px 10px; border-radius: 4px;
    font-size: 0.75rem; font-weight: 700;
}

/* ── Back to Top ── */
#back-to-top {
    position: fixed; bottom: 88px; right: 28px; z-index: 999;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--primary); color: #fff;
    border: none; font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: var(--transition); box-shadow: 0 4px 15px rgba(46,125,50,0.4);
}
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ── Order Success Alert ── */
.order-success-alert {
    position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
    z-index: 9999; min-width: 400px; text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    animation: slideDown 0.4s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ── Utility ── */
.section-bg-light { background: var(--light); }
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.divider { height: 3px; width: 70px; background: var(--primary); border-radius: 2px; margin: 0 auto; }

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .search-form { display: none; }
    .hero-section { min-height: auto; padding: 80px 0; text-align: center; }
    .hero-image-wrap { margin-top: 40px; }
    .hero-stats { justify-content: center; }
    .hero-offers { justify-content: center; }
    .hero-buttons { display: flex; justify-content: center; gap: 12px; }
    .shop-sidebar { position: static; margin-bottom: 24px; }
    .cart-summary-card { position: static; }
}

@media (max-width: 767.98px) {
    .navbar-top { display: none; }
    .section-title { font-size: 1.6rem; }
    .newsletter-form { flex-direction: column; border-radius: var(--radius); overflow: visible; }
    .newsletter-form input, .newsletter-form button { border-radius: 30px; width: 100%; }
    .offer-card .discount-value { display: none; }
    .countdown-boxes { flex-wrap: wrap; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .cart-table { font-size: 0.85rem; }
    .product-detail-title { font-size: 1.4rem; }
}

@media (max-width: 575.98px) {
    .hero-title { font-size: 1.8rem; }
    .hero-stat strong { font-size: 1.2rem; }
    .category-card { padding: 20px 12px; }
    .category-icon { width: 60px; height: 60px; font-size: 1.5rem; }
    .shop-toolbar { flex-direction: column; align-items: stretch; }
    #product-count { margin-right: 0; }
}
