/* ===== Asian Grocery Store - Main Stylesheet ===== */
:root {
    --primary: #D32F2F;
    --primary-dark: #B71C1C;
    --primary-light: #FFCDD2;
    --secondary: #FF8F00;
    --accent: #2E7D32;
    --accent-light: #E8F5E9;
    --dark: #263238;
    --gray: #78909C;
    --light-gray: #ECEFF1;
    --bg-light: #FAFAFA;
    --white: #FFFFFF;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    color: var(--dark);
    overflow-x: hidden;
}

/* ===== Navbar ===== */
.navbar {
    padding: 12px 0;
    background: var(--white) !important;
    transition: var(--transition);
}

.navbar-brand .brand-icon {
    font-size: 1.8rem;
    color: var(--primary);
}

.brand-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    padding: 8px 16px !important;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

.nav-icon {
    color: var(--dark);
    font-size: 1.2rem;
    transition: var(--transition);
    position: relative;
}

.nav-icon:hover { color: var(--primary); }

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-user {
    background: transparent;
    border: 1px solid var(--light-gray);
    border-radius: 50px;
    padding: 6px 16px;
    font-weight: 500;
    transition: var(--transition);
}

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

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

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

/* ===== Hero / Banner ===== */
.hero-section {
    position: relative;
    min-height: 500px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.15;
}

.hero-content { position: relative; z-index: 2; }

.hero-badge {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-title span { color: var(--secondary); }

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 30px;
    max-width: 500px;
    line-height: 1.6;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-hero {
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-primary {
    background: var(--secondary);
    color: var(--dark);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,143,0,0.4);
    color: var(--dark);
}

.btn-hero-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-hero-secondary:hover {
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.hero-stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* Hero Slide (Bootstrap Carousel) */
.hero-slide {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-slide-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 2;
}

.hero-carousel-section .carousel-control-prev,
.hero-carousel-section .carousel-control-next {
    z-index: 4;
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
}

.hero-carousel-section:hover .carousel-control-prev,
.hero-carousel-section:hover .carousel-control-next {
    opacity: 1;
}

.hero-carousel-section .carousel-control-prev { left: 20px; }
.hero-carousel-section .carousel-control-next { right: 20px; }

.hero-carousel-section .carousel-indicators {
    z-index: 4;
}

.hero-carousel-section .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
}

.hero-carousel-section .carousel-indicators button.active {
    background: var(--secondary);
    border-color: var(--secondary);
}

/* ===== Section Titles ===== */
.section-title-wrapper {
    text-align: center;
    margin-bottom: 40px;
}

.section-subtitle {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.section-title-underline {
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ===== Category Cards ===== */
.category-card {
    display: block;
    text-decoration: none;
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.category-card:hover::before { transform: scaleX(1); }

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

.category-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.8rem;
    color: var(--primary);
    transition: var(--transition);
}

.category-card:hover .category-icon {
    background: var(--primary);
    color: white;
}

.category-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.category-count {
    font-size: 0.85rem;
    color: var(--gray);
}

/* ===== Product Cards ===== */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge-sale {
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-new {
    background: var(--accent);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-best {
    background: var(--secondary);
    color: var(--dark);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    padding: 20px;
}

.product-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

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

.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.product-info {
    padding: 16px;
}

.product-category {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.6em;
}

.product-name a {
    color: inherit;
    text-decoration: none;
}

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

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.stars { color: var(--secondary); }
.stars-empty { color: var(--light-gray); }

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-current {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.price-old {
    font-size: 0.9rem;
    color: var(--gray);
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.add-to-cart-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
}

/* ===== Promo Banners ===== */
.promo-banner {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    padding: 40px;
}

.promo-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.promo-banner .promo-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 100%);
    z-index: 1;
}

.promo-content { position: relative; z-index: 2; max-width: 400px; }

.promo-banner .promo-content { z-index: 3; }

.promo-tag {
    display: inline-block;
    background: var(--secondary);
    color: var(--dark);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.promo-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.promo-desc {
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
    font-size: 1rem;
}

.promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--dark);
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    color: var(--dark);
}

/* ===== Reviews / Testimonials ===== */
.testimonial-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
}

.testimonial-stars {
    color: var(--secondary);
    margin-bottom: 16px;
    font-size: 1rem;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-user {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.testimonial-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.testimonial-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.testimonial-role {
    font-size: 0.8rem;
    color: var(--gray);
}

/* ===== Newsletter ===== */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
}

.newsletter-content { position: relative; z-index: 2; }

.newsletter-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.newsletter-text {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
}

.newsletter-form .input-group {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    padding: 14px 20px;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
}

.newsletter-form .btn-subscribe {
    padding: 14px 30px;
    background: var(--secondary);
    color: var(--dark);
    border: none;
    border-radius: 0 50px 50px 0;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form .btn-subscribe:hover {
    background: #FFA726;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
}

.footer-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.footer-brand i { color: var(--primary); }

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social { display: flex; gap: 10px; }

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: white;
}

.footer-heading {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 4px;
}

.footer-contact { list-style: none; padding: 0; }

.footer-contact li {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.footer-contact li i {
    color: var(--primary);
    margin-top: 3px;
    min-width: 16px;
}

.footer-contact li a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
}

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

.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 30px 0;
}

.copyright { font-size: 0.85rem; }

.payment-text { font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* ===== WhatsApp Float ===== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    z-index: 999;
    text-decoration: none;
    transition: var(--transition);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 4px 15px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 25px rgba(37,211,102,0.6); }
    100% { box-shadow: 0 4px 15px rgba(37,211,102,0.4); }
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

/* ===== Page Header ===== */
.page-header {
    background: linear-gradient(135deg, var(--dark) 0%, #37474f 100%);
    padding: 60px 0 40px;
    color: white;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
}

.breadcrumb-custom {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    font-size: 0.9rem;
}

.breadcrumb-custom li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: rgba(255,255,255,0.4);
}

.breadcrumb-custom a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.breadcrumb-custom a:hover { color: var(--secondary); }

.breadcrumb-custom .active { color: var(--secondary); }

/* ===== Shop Filters ===== */
.filter-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.filter-section h6 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.filter-list { list-style: none; padding: 0; }

.filter-list li { margin-bottom: 6px; }

.filter-list a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 4px 0;
    transition: var(--transition);
}

.filter-list a:hover,
.filter-list a.active { color: var(--primary); }

/* ===== Product Detail ===== */
.product-detail-image {
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    border: 1px solid var(--light-gray);
}

.product-detail-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.product-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.product-detail-price .old-price {
    font-size: 1.2rem;
    color: var(--gray);
    text-decoration: line-through;
    font-weight: 400;
}

.product-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.stock-in { background: var(--accent-light); color: var(--accent); }
.stock-out { background: #FFEBEE; color: #C62828; }
.stock-backorder { background: #FFF8E1; color: #F57F17; }

.product-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--light-gray);
    background: white;
    border-radius: 8px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.qty-btn:hover { background: var(--light-gray); }

.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-weight: 600;
}

.product-meta {
    padding: 16px 0;
    border-top: 1px solid var(--light-gray);
    margin-top: 16px;
}

.product-meta p {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--gray);
}

.product-meta strong { color: var(--dark); }

/* ===== Cart Page ===== */
.cart-table {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: contain;
    background: #f8f8f8;
    padding: 8px;
}

.cart-item-details { flex: 1; }

.cart-item-name {
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
}

.cart-item-name:hover { color: var(--primary); }

.cart-item-price { color: var(--primary); font-weight: 600; }

.cart-item-total {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
    min-width: 100px;
}

.cart-remove {
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    font-size: 1.2rem;
}

.cart-remove:hover { color: var(--primary); }

.cart-summary {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.cart-summary h5 {
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--light-gray);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.3rem;
    padding-top: 12px;
    border-top: 2px solid var(--dark);
    color: var(--primary);
}

/* ===== Checkout ===== */
.checkout-section {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.checkout-section h4 {
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--light-gray);
}

.form-label { font-weight: 500; font-size: 0.9rem; }

.form-control, .form-select {
    padding: 10px 14px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(211,47,47,0.1);
}

.payment-method-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 10px;
}

.payment-method-card:hover,
.payment-method-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-method-card input[type="radio"] { display: none; }

.payment-icon {
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* ===== Auth Pages ===== */
.auth-card {
    max-width: 450px;
    margin: 60px auto;
}

.auth-card .card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
}

.auth-header {
    background: var(--primary);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: var(--radius) var(--radius) 0 0;
}

.auth-body { padding: 30px; }

/* ===== Alert / Toast ===== */
.alert-custom {
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 20px;
}

/* ===== Account Page ===== */
.account-sidebar {
    background: white;
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.account-sidebar .user-info {
    padding: 24px 20px;
    background: var(--primary);
    color: white;
    text-align: center;
}

.account-sidebar .user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 12px;
}

.account-nav { list-style: none; padding: 0; margin: 0; }

.account-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.account-nav li a:hover,
.account-nav li a.active {
    background: var(--primary-light);
    border-left-color: var(--primary);
    color: var(--primary);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--light-gray);
    margin-bottom: 20px;
}

.empty-state h5 {
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* ===== Modal ===== */
.modal-content {
    border: none;
    border-radius: var(--radius);
}

.modal-header {
    background: var(--primary);
    color: white;
    border-radius: var(--radius) var(--radius) 0 0;
}

/* ===== Loading Spinner ===== */
.spinner-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ===== Admin Styles ===== */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--dark);
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
}

.admin-sidebar-brand {
    padding: 20px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-nav { list-style: none; padding: 0; }

.admin-sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.admin-sidebar-nav li a:hover,
.admin-sidebar-nav li a.active {
    background: rgba(255,255,255,0.05);
    color: white;
    border-left-color: var(--primary);
}

.admin-main {
    margin-left: 260px;
    min-height: 100vh;
}

.admin-header {
    background: white;
    padding: 16px 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-content { padding: 30px; }

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.stat-icon.products { background: #E3F2FD; color: #1565C0; }
.stat-icon.orders { background: #E8F5E9; color: #2E7D32; }
.stat-icon.customers { background: #FFF3E0; color: #E65100; }
.stat-icon.revenue { background: #FCE4EC; color: #C62828; }

.stat-info h6 { font-size: 0.85rem; color: var(--gray); margin-bottom: 4px; }
.stat-info h3 { font-weight: 700; margin: 0; }

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .hero-title { font-size: 2.2rem; }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .hero-stats { gap: 24px; flex-wrap: wrap; }
}

@media (max-width: 767px) {
    .hero-title { font-size: 1.8rem; }
    .hero-section { min-height: 400px; }
    .section-title { font-size: 1.5rem; }
    .promo-banner { padding: 30px 20px; min-height: 200px; }
    .promo-title { font-size: 1.3rem; }
    .newsletter-title { font-size: 1.3rem; }
    .product-detail-title { font-size: 1.3rem; }
    .product-detail-price { font-size: 1.5rem; }
    .page-header { padding: 40px 0 30px; }
    .page-title { font-size: 1.5rem; }
    .footer { padding: 40px 0 20px; }
    .stat-card { padding: 16px; }
    .stat-icon { width: 48px; height: 48px; font-size: 1.2rem; }
    .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .product-image-wrapper { height: 150px; }
    .product-info { padding: 10px; }
    .product-name { font-size: 0.85rem; }
    .price-current { font-size: 1rem; }
    .add-to-cart-btn { padding: 8px; font-size: 0.8rem; }
    .product-actions { opacity: 1; transform: none; }
    .product-action-btn { width: 30px; height: 30px; font-size: 0.75rem; }
}

@media (max-width: 575px) {
    .hero-title { font-size: 1.5rem; }
    .hero-stats { flex-direction: column; gap: 12px; }
    .cart-item { flex-wrap: wrap; }
    .auth-card { margin: 30px 10px; }
    .checkout-section { padding: 20px; }
    .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .product-image-wrapper { height: 130px; }
    .product-info { padding: 8px; }
    .product-name { font-size: 0.8rem; min-height: 2.2em; }
    .price-current { font-size: 0.9rem; }
    .add-to-cart-btn { padding: 6px; font-size: 0.75rem; }
    .owl-item .product-card { margin: 0 4px; }
}

/* Transitions & Animations */
.fade-in { animation: fadeIn 0.5s ease forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up { animation: slideUp 0.5s ease forwards; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toast notification */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

/* Stars rating display */
.stars-display {
    display: inline-flex;
    gap: 2px;
    font-size: 1rem;
}

.stars-display .fa-star { color: var(--secondary); }
.stars-display .fa-star.empty { color: var(--light-gray); }

/* Order status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending { background: #FFF8E1; color: #F57F17; }
.status-confirmed { background: #E3F2FD; color: #1565C0; }
.status-processing { background: #F3E5F5; color: #7B1FA2; }
.status-shipped { background: #E8F5E9; color: #2E7D32; }
.status-delivered { background: #E8F5E9; color: #1B5E20; }
.status-cancelled { background: #FFEBEE; color: #C62828; }

.payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.payment-paid { background: #E8F5E9; color: #2E7D32; }
.payment-pending { background: #FFF8E1; color: #F57F17; }
.payment-failed { background: #FFEBEE; color: #C62828; }
.payment-refunded { background: #F3E5F5; color: #7B1FA2; }

/* Product grid spacing */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* Search bar */
.search-bar {
    position: relative;
}

.search-bar input {
    padding-right: 44px;
}

.search-bar .search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar .search-btn:hover { background: var(--primary-dark); }

/* Coupon input */
.coupon-input {
    display: flex;
    gap: 8px;
}

.coupon-input input { flex: 1; }

/* Dashboard cards grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

/* Table styles */
.table-custom {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-custom thead {
    background: var(--light-gray);
}

.table-custom th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border: none;
}

.table-custom td {
    padding: 14px 16px;
    vertical-align: middle;
    border-color: var(--light-gray);
}

/* Image preview in admin */
.img-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

/* Sort dropdown */
.sort-select {
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.9rem;
    background: white;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dark);
    color: white;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    transition: var(--transition);
}

.scroll-top:hover { background: var(--primary); }

/* ===== Side Cart ===== */
.side-cart-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-cart {
    position: fixed;
    top: 0; right: -400px;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: white;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
}

.side-cart.open {
    right: 0;
}

.side-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    flex-shrink: 0;
}

.side-cart-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.side-cart-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--gray);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.side-cart-close:hover {
    background: var(--light-gray);
    color: var(--dark);
}

.side-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.side-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    animation: fadeIn 0.3s ease;
}

.side-cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: contain;
    background: #f8f8f8;
    padding: 6px;
    flex-shrink: 0;
}

.side-cart-item-info {
    flex: 1;
    min-width: 0;
}

.side-cart-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-cart-item-name:hover { color: var(--primary); }

.side-cart-item-price {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 2px;
}

.side-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.side-cart-qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--light-gray);
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.side-cart-qty-btn:hover { background: var(--light-gray); }

.side-cart-qty-val {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.side-cart-item-remove {
    color: #ccc;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
}

.side-cart-item-remove:hover { color: var(--primary); }

.side-cart-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--light-gray);
    flex-shrink: 0;
    background: white;
}

.side-cart-summary {
    margin-bottom: 16px;
}

.side-cart-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.side-cart-empty {
    padding: 20px;
}

@media (max-width: 480px) {
    .side-cart { width: 100vw; right: -100vw; }
}
