/* ============================================================
   Newsolution — WhatsApp Shop Stylesheet
   Brand: Newsolution Networking Venture
   Fonts: Syne (display) + DM Sans (body)
   Primary: #e8291c (Brand Red) | Secondary: #3f5965 (Slate Blue)
   ============================================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
    --green:        #e8291c;
    --green-dark:   #b71c1c;
    --green-light:  #fde8e8;
    --wa-green:     #25d366;
    --wa-dark:      #128c7e;
    --accent:       #3f5965;
    --accent-light: #e8eef1;
    --slate:        #2a3840;
    --slate-mid:    #3f5965;
    --text:         #2a3840;
    --text-mid:     #4a5568;
    --text-light:   #718096;
    --border:       #e2e8f0;
    --bg:           #f7f9fc;
    --white:        #ffffff;
    --card-shadow:  0 2px 16px rgba(0,0,0,.07);
    --card-hover:   0 8px 32px rgba(0,0,0,.13);
    --radius:       12px;
    --radius-sm:    8px;
    --transition:   .2s ease;
    --font-display: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- TOP BAR ---------- */
.topbar {
    background: var(--slate);
    color: #a0aec0;
    font-size: .8rem;
    padding: 7px 0;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.topbar a { color: var(--wa-green); }
.topbar a:hover { color: var(--white); }
.topbar .topbar-right { display: flex; gap: 8px; }
.topbar .admin-link { color: var(--accent) !important; }
.topbar i.fa-whatsapp { color: var(--wa-green); margin-right: 4px; }

/* ---------- MAIN HEADER ---------- */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow .3s;
}
.main-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.12); }

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 14px;
    padding-bottom: 14px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.logo-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #e8291c, #b71c1c);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.1rem;
}
.logo-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--slate);
    letter-spacing: -.5px;
}

/* Search bar */
.search-bar {
    flex: 1;
    position: relative;
    max-width: 480px;
}
.search-bar form {
    display: flex;
    border: 2px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color var(--transition);
    background: var(--white);
}
.search-bar form:focus-within { border-color: var(--green); }
.search-bar input {
    flex: 1;
    padding: 10px 18px;
    border: none;
    outline: none;
    font-size: .95rem;
    background: transparent;
}
.search-bar button {
    padding: 0 18px;
    background: var(--green);
    color: white;
    border: none;
    font-size: 1rem;
    transition: background var(--transition);
}
.search-bar button:hover { background: var(--green-dark); }

.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--card-shadow);
    z-index: 200;
    display: none;
    overflow: hidden;
}
.search-suggestions a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: .9rem;
    transition: background var(--transition);
}
.search-suggestions a:hover { background: var(--bg); }
.search-suggestions img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    color: var(--slate);
    background: var(--bg);
    position: relative;
    transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: var(--green-light); color: var(--green-dark); }
.cart-badge {
    position: absolute;
    top: -2px; right: -2px;
    width: 20px; height: 20px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    font-size: .7rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.search-toggle { display: none; }

/* ---------- NAVIGATION ---------- */
.main-nav {
    background: var(--slate);
    border-top: 3px solid var(--green);
}
.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}
.nav-list a {
    display: block;
    padding: 12px 16px;
    color: #cbd5e0;
    font-size: .88rem;
    font-weight: 500;
    letter-spacing: .3px;
    transition: color var(--transition), background var(--transition);
    text-transform: uppercase;
}
.nav-list a:hover,
.nav-list a.active {
    color: var(--white);
    background: rgba(255,255,255,.07);
}

/* Hamburger */
.hamburger {
    display: block;
    width: 20px; height: 2px;
    background: var(--slate);
    position: relative;
    transition: background var(--transition);
}
.hamburger::before, .hamburger::after {
    content: '';
    display: block;
    width: 20px; height: 2px;
    background: var(--slate);
    position: absolute;
    transition: transform var(--transition);
}
.hamburger::before { top: -6px; }
.hamburger::after  { top: 6px; }
.menu-toggle { display: none; }

/* ---------- FLASH MESSAGES ---------- */
.flash { padding: 14px 0; font-size: .9rem; position: relative; }
.flash .container { display: flex; justify-content: space-between; align-items: center; }
.flash-success { background: #d4edda; color: #155724; border-bottom: 2px solid #c3e6cb; }
.flash-error   { background: #f8d7da; color: #721c24; border-bottom: 2px solid #f5c6cb; }
.flash-info    { background: #d1ecf1; color: #0c5460; border-bottom: 2px solid #bee5eb; }
.flash-close   { background: none; border: none; font-size: 1.4rem; cursor: pointer; line-height: 1; opacity: .6; }
.flash-close:hover { opacity: 1; }

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .95rem;
    transition: all var(--transition);
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
}
.btn-primary { background: var(--green); color: white; border-color: var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,41,28,.3); }

.btn-whatsapp { background: var(--wa-green); color: white; border-color: var(--wa-green); font-size: 1rem; padding: 14px 28px; }
.btn-whatsapp:hover { background: var(--wa-dark); border-color: var(--wa-dark); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(37,211,102,.4); }
.btn-whatsapp i { font-size: 1.2rem; }

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

.btn-secondary { background: var(--slate); color: white; border-color: var(--slate); }
.btn-secondary:hover { background: var(--slate-mid); }

.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { display: flex; width: 100%; }
.btn-danger { background: #e53e3e; color: white; border-color: #e53e3e; }
.btn-danger:hover { background: #c53030; }

/* ---------- PRODUCT CARDS ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--card-hover); }

.product-card-img {
    position: relative;
    padding-top: 75%; /* 4:3 ratio */
    overflow: hidden;
    background: var(--bg);
}
.product-card-img img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.06); }

.badge {
    position: absolute;
    top: 12px;
    border-radius: 50px;
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.badge-sale     { left: 12px; background: var(--accent); color: white; }
.badge-featured { left: 12px; background: var(--green); color: white; }
.badge-out      { left: 12px; background: #718096; color: white; }

.product-card-wishlist {
    position: absolute;
    top: 12px; right: 12px;
    width: 32px; height: 32px;
    background: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem;
    color: var(--text-light);
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transition: color var(--transition);
}
.product-card-wishlist:hover { color: #e53e3e; }

.product-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-cat-tag {
    font-size: .75rem;
    color: var(--green-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}
.product-card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--slate);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-title a:hover { color: var(--green-dark); }

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
}
.price-current {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--slate);
}
.price-old {
    font-size: .85rem;
    color: var(--text-light);
    text-decoration: line-through;
}
.price-discount {
    font-size: .75rem;
    background: var(--accent-light);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.product-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}
.product-card-footer .btn { flex: 1; padding: 10px 12px; font-size: .82rem; }

/* ---------- SECTION HEADINGS ---------- */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--slate);
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: var(--green);
    border-radius: 2px;
    margin-top: 6px;
}
.section-link { font-size: .9rem; color: var(--green-dark); font-weight: 600; }
.section-link:hover { text-decoration: underline; }

/* ---------- HERO BANNER ---------- */
.hero {
    background: linear-gradient(135deg, var(--slate) 0%, var(--slate-mid) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(232,41,28,.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(232,41,28,.15);
    border: 1px solid rgba(232,41,28,.3);
    color: var(--green);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hero h1 span { color: var(--green); }
.hero-desc { color: #a0aec0; font-size: 1.05rem; margin-bottom: 32px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,.1);
}
.hero-stat-num {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--green);
}
.hero-stat-label { font-size: .82rem; color: #718096; text-transform: uppercase; letter-spacing: .5px; }
.hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
}
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
    position: absolute;
    bottom: -16px; left: -16px;
    background: var(--wa-green);
    color: white;
    padding: 16px 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 8px 32px rgba(37,211,102,.4);
}
.hero-badge i { font-size: 1.5rem; display: block; margin-bottom: 4px; }
.hero-badge span { font-size: .78rem; font-weight: 600; display: block; }

/* ---------- CATEGORY PILLS ---------- */
.category-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.category-pill {
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid var(--border);
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-mid);
    transition: all var(--transition);
    cursor: pointer;
    background: var(--white);
}
.category-pill:hover,
.category-pill.active {
    border-color: var(--green);
    background: var(--green);
    color: white;
}

/* ---------- CART SIDEBAR ---------- */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.cart-overlay.active { opacity: 1; pointer-events: all; }

.cart-sidebar {
    position: fixed;
    top: 0; right: -420px;
    width: 100%; max-width: 420px;
    height: 100vh;
    background: var(--white);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transition: right .35s cubic-bezier(.4,0,.2,1);
    box-shadow: -8px 0 32px rgba(0,0,0,.15);
}
.cart-sidebar.active { right: 0; }

.cart-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.cart-sidebar-header h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.close-sidebar {
    font-size: 1.8rem;
    line-height: 1;
    color: var(--text-light);
    transition: color var(--transition);
}
.close-sidebar:hover { color: var(--text); }

.cart-sidebar-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-sidebar-footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-total-row { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 1rem; }
.cart-total-row strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--green-dark); }

.cart-item-row {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.cart-item-img { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: var(--bg); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: .85rem; color: var(--text-mid); margin-top: 2px; }
.cart-item-controls { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.qty-btn { width: 26px; height: 26px; border-radius: 6px; background: var(--bg); font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.qty-btn:hover { background: var(--green); color: white; }
.qty-input { width: 36px; text-align: center; border: 1px solid var(--border); border-radius: 6px; padding: 3px; font-size: .85rem; }
.cart-remove { color: var(--text-light); font-size: .8rem; margin-left: auto; }
.cart-remove:hover { color: #e53e3e; }
.empty-cart-msg { text-align: center; color: var(--text-light); padding: 40px 0; }

/* ---------- SECTION PADDING ---------- */
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-dark { background: var(--slate); color: white; }
.section-light { background: var(--white); }
.section-green { background: var(--green-light); }

/* ---------- FILTER SIDEBAR (products page) ---------- */
.products-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}
.filter-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    position: sticky;
    top: 80px;
}
.filter-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin-bottom: 20px; color: var(--slate); }
.filter-group { margin-bottom: 24px; }
.filter-group-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); margin-bottom: 12px; }
.filter-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer; font-size: .9rem; }
.filter-check input { accent-color: var(--green); }
.price-range { display: flex; gap: 12px; align-items: center; }
.price-range input { width: 100%; padding: 8px 10px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: .85rem; }
.price-range input:focus { border-color: var(--green); outline: none; }

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 0;
    font-size: .85rem;
    color: var(--text-light);
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--green-dark); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }

/* ---------- PRODUCT DETAIL ---------- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.product-gallery { position: sticky; top: 90px; }
.product-main-img {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    margin-bottom: 12px;
}
.product-main-img img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.product-thumb {
    width: 72px; height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: border-color var(--transition);
}
.product-thumb:hover, .product-thumb.active { border-color: var(--green); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info-panel { }
.product-category-tag { font-size: .8rem; color: var(--green-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.product-title { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.product-price-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.product-price { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--slate); }
.product-old-price { font-size: 1.1rem; color: var(--text-light); text-decoration: line-through; }
.product-discount { background: var(--accent); color: white; padding: 4px 10px; border-radius: 50px; font-size: .8rem; font-weight: 700; }
.product-stock-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 50px; font-size: .82rem; font-weight: 600; margin-bottom: 16px; }
.stock-in { background: var(--green-light); color: var(--green-dark); }
.stock-low { background: var(--accent-light); color: var(--accent); }
.stock-out { background: #fee; color: #c53030; }
.product-short-desc { color: var(--text-mid); margin-bottom: 24px; line-height: 1.7; }
.product-qty-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.qty-selector { display: flex; align-items: center; gap: 0; border: 2px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-selector .qty-btn { width: 40px; height: 44px; border-radius: 0; font-size: 1.2rem; }
.qty-selector .qty-val { width: 56px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); padding: 0 8px; height: 44px; font-weight: 700; font-size: 1rem; }
.product-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.product-cta .btn { flex: 1; }
.product-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.product-meta { font-size: .85rem; color: var(--text-mid); line-height: 1.9; }
.product-meta strong { color: var(--text); }
.product-desc { margin-top: 40px; }
.product-desc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.product-desc p { color: var(--text-mid); line-height: 1.8; }

/* ---------- CART PAGE ---------- */
.cart-page-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 12px 16px; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); border-bottom: 2px solid var(--border); }
.cart-table td { padding: 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-table-img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-product-info { display: flex; align-items: center; gap: 16px; }
.cart-summary { background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 28px; position: sticky; top: 90px; }
.cart-summary h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: .92rem; }
.summary-total { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; border-top: 2px solid var(--border); padding-top: 12px; margin-top: 8px; }

/* Whatsapp form */
.wa-form { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--card-shadow); margin-top: 24px; }
.wa-form h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.wa-form p { font-size: .88rem; color: var(--text-mid); margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    transition: border-color var(--transition);
    background: var(--white);
    color: var(--text);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--green); outline: none; }
.form-group textarea { resize: vertical; min-height: 80px; }

/* ---------- WHATSAPP FLOATING BTN ---------- */
.wa-float {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 60px; height: 60px;
    background: var(--wa-green);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37,211,102,.5);
    z-index: 500;
    transition: transform var(--transition), box-shadow var(--transition);
    animation: pulse-wa 2s infinite;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 8px 32px rgba(37,211,102,.6); animation: none; }
@keyframes pulse-wa {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,.5); }
    50%       { box-shadow: 0 4px 32px rgba(37,211,102,.8); }
}

/* ---------- NEWSLETTER / PROMO BANNER ---------- */
.promo-banner {
    background: linear-gradient(135deg, #e8291c, #b71c1c);
    color: white;
    text-align: center;
    padding: 56px 20px;
    border-radius: var(--radius);
}
.promo-banner h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.promo-banner p { font-size: 1.05rem; opacity: .85; margin-bottom: 28px; }

.newsletter-form { display: flex; gap: 0; max-width: 440px; margin: 0 auto; border-radius: 50px; overflow: hidden; border: 3px solid rgba(255,255,255,.3); }
.newsletter-form input { flex: 1; padding: 12px 20px; background: rgba(255,255,255,.15); border: none; color: white; outline: none; font-size: .95rem; }
.newsletter-form input::placeholder { color: rgba(255,255,255,.6); }
.newsletter-form button { padding: 12px 24px; background: white; color: var(--green-dark); font-weight: 700; border: none; font-family: var(--font-body); font-size: .9rem; cursor: pointer; transition: background var(--transition); white-space: nowrap; }
.newsletter-form button:hover { background: var(--accent-light); }
.newsletter-msg { font-size: .85rem; margin-top: 8px; color: rgba(255,255,255,.8); }

/* Footer newsletter */
.site-footer .newsletter-form { border-color: var(--border); border-radius: var(--radius-sm); overflow: hidden; max-width: 100%; }
.site-footer .newsletter-form input { background: var(--bg); color: var(--text); border: none; }
.site-footer .newsletter-form input::placeholder { color: var(--text-light); }
.site-footer .newsletter-form button { background: #e8291c; color: white; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--slate); color: #a0aec0; padding: 64px 0 0; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 48px; }
.footer-logo .logo-text { color: white; }
.footer-tagline { font-size: .9rem; margin: 12px 0 20px; line-height: 1.6; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.08);
    color: #a0aec0;
    transition: background var(--transition), color var(--transition);
}
.footer-social a:hover { background: var(--green); color: white; }
.social-wa:hover { background: var(--wa-green) !important; }
.footer-heading { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: white; margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: .9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--green); }
.contact-info { margin-top: 16px; font-size: .85rem; line-height: 2; }
.contact-info i { color: var(--green); width: 16px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-pay { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
.footer-pay span { font-size: .8rem; font-size: .75rem; }

/* ---------- SORT / TOOLBAR ---------- */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.products-count { font-size: .9rem; color: var(--text-mid); }
.sort-select {
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .9rem;
    cursor: pointer;
    background: var(--white);
}
.sort-select:focus { border-color: var(--green); outline: none; }

/* ---------- PAGINATION ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.page-btn {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
    font-weight: 600;
    background: var(--white);
    border: 2px solid var(--border);
    color: var(--text);
    transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--green); border-color: var(--green); color: white; }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ---------- AUTH PAGES ---------- */
.auth-page { display: flex; min-height: 80vh; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 48px 40px; width: 100%; max-width: 440px; }
.auth-card h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.auth-card p { color: var(--text-mid); margin-bottom: 32px; }
.auth-link { text-align: center; margin-top: 24px; font-size: .9rem; color: var(--text-mid); }
.auth-link a { color: var(--green-dark); font-weight: 600; }

/* ---------- ADMIN PANEL ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; background: var(--slate); color: white; flex-shrink: 0; }
.admin-sidebar-logo { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-nav { padding: 16px 0; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: #a0aec0; font-size: .9rem; transition: background var(--transition), color var(--transition); }
.admin-nav a:hover, .admin-nav a.active { background: rgba(232,41,28,.15); color: white; border-left: 3px solid #e8291c; }
.admin-nav a i { width: 18px; }
.admin-main { flex: 1; overflow-x: auto; }
.admin-header { background: white; padding: 20px 32px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.admin-header h1 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.admin-content { padding: 32px; }
.admin-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; margin-bottom: 24px; }
.admin-card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.admin-card-header h3 { font-family: var(--font-display); font-weight: 700; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 12px 16px; text-align: left; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); border-bottom: 2px solid var(--border); background: var(--bg); }
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
.admin-table tr:hover td { background: var(--bg); }
.admin-table img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); }
.stat-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 24px; }
.stat-card-num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--slate); }
.stat-card-label { font-size: .85rem; color: var(--text-light); margin-top: 4px; }
.stat-card-icon { font-size: 2rem; color: var(--green); opacity: .5; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }

/* Badges/tags */
.tag { display: inline-flex; padding: 3px 10px; border-radius: 50px; font-size: .75rem; font-weight: 700; }
.tag-success { background: var(--green-light); color: var(--green-dark); }
.tag-warning { background: var(--accent-light); color: var(--accent); }
.tag-danger  { background: #fee; color: #c53030; }
.tag-info    { background: #ebf8ff; color: #2b6cb0; }

/* ---------- TOAST NOTIFICATION ---------- */
.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
    background: var(--slate);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    animation: slideUp .3s ease;
    pointer-events: all;
}
.toast-success { border-left: 4px solid var(--green); }
.toast-error   { border-left: 4px solid #e53e3e; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- SKELETON LOADER ---------- */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- NO RESULTS ---------- */
.no-results { text-align: center; padding: 80px 20px; color: var(--text-light); }
.no-results i { font-size: 3rem; margin-bottom: 16px; display: block; color: var(--border); }
.no-results h3 { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-mid); margin-bottom: 8px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .products-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-image { display: none; }
}
@media (max-width: 768px) {
    .search-bar { display: none; }
    .search-bar.mobile-open { display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 2000; padding: 16px; background: white; box-shadow: 0 4px 16px rgba(0,0,0,.1); }
    .search-toggle { display: flex; }
    .menu-toggle { display: flex; }
    .main-nav { display: none; }
    .main-nav.open { display: block; }
    .nav-list { flex-direction: column; }
    .nav-list a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .hero { padding: 48px 0; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { gap: 20px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .product-detail { grid-template-columns: 1fr; }
    .product-gallery { position: static; }
    .cart-page-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .section { padding: 40px 0; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 32px 20px; }
}

/* ============================================================
   ADDITIONS: Wishlist, Track Order, Invoice, Reviews, Coupons
   ============================================================ */

/* ---------- WISHLIST BUTTON (active state) ---------- */
.product-card-wishlist.active { color: #e53e3e; }
.product-card-wishlist.active i { font-weight: 900; }

/* ---------- TRACK ORDER PROGRESS ---------- */
.order-progress {
    display: flex;
    align-items: flex-start;
    padding: 8px 0 24px;
    overflow-x: auto;
}
.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    min-width: 80px;
}
.progress-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 3px solid var(--border);
    background: white;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    color: var(--text-light);
    font-size: 1.1rem;
    transition: all .3s;
    position: relative;
    z-index: 2;
}
.progress-step.done    .progress-icon { border-color: var(--green); color: var(--green); background: var(--green-light); }
.progress-step.current .progress-icon { border-color: var(--green); color: white; background: var(--green); box-shadow: 0 0 0 5px rgba(232,41,28,.2); }
.progress-label { font-size: .75rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; }
.progress-step.done    .progress-label { color: var(--green-dark); }
.progress-step.current .progress-label { color: var(--slate); }
.progress-desc  { font-size: .73rem; color: var(--text-mid); margin-top: 4px; max-width: 110px; margin-left: auto; margin-right: auto; line-height: 1.4; }
.progress-line {
    position: absolute;
    top: 22px; left: 50%;
    width: 100%; height: 3px;
    background: var(--border);
    z-index: 1;
    transition: background .3s;
}
.progress-line.done { background: var(--green); }

/* ---------- PRODUCT STARS (card) ---------- */
.product-stars { letter-spacing: 1px; }

/* ---------- COUPON SECTION ---------- */
.coupon-applied-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--green-light);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(232,41,28,.3);
    font-size: .88rem;
    margin-bottom: 10px;
}
.coupon-applied-bar strong { color: var(--green-dark); }
.coupon-remove-btn { color: #e53e3e; font-size: .8rem; font-weight: 600; cursor: pointer; background: none; border: none; }

/* ---------- REVIEW FORM IMPROVEMENTS ---------- */
.star-picker { display: flex; flex-direction: row-reverse; gap: 6px; width: fit-content; margin-bottom: 4px; }
.star-picker input[type="radio"] { display: none; }
.star-picker label { font-size: 2.2rem; color: #d1d5db; cursor: pointer; transition: color .15s; line-height: 1; }
.star-picker input:checked       ~ label { color: #f59e0b; }
.star-picker label:hover,
.star-picker label:hover         ~ label { color: #f59e0b; }

/* ---------- ADMIN ANALYTICS ---------- */
.chart-container { position: relative; }

/* ---------- INVOICE PRINT STYLES ---------- */
@media print {
    .main-header, .main-nav, .topbar, .site-footer,
    .wa-float, .no-print, .breadcrumb { display: none !important; }
    main { padding: 0 !important; }
}

/* ---------- ACCOUNT PAGE SIDEBAR NAV ACTIVE ---------- */
.account-nav-link.active {
    background: var(--green-light) !important;
    color: var(--green-dark) !important;
}

/* ---------- TRACK ORDER SEARCH ---------- */
.track-input {
    font-size: 1rem;
    letter-spacing: 1px;
    font-family: monospace;
}

/* ---------- COUPON BADGE ON CART ---------- */
.discount-row { color: var(--green-dark); font-weight: 600; }
.discount-row span:last-child { color: var(--green-dark); }

/* ---------- ADMIN REVIEWS STARS ---------- */
.review-stars-admin { color: #f59e0b; font-size: 1rem; letter-spacing: 2px; }

/* ---------- PRODUCT DETAIL RATING STARS ---------- */
.detail-stars { font-size: 1.3rem; color: #f59e0b; letter-spacing: 2px; }
.detail-stars a { font-size: .85rem; color: var(--text-light); margin-left: 6px; }
.detail-stars a:hover { color: var(--green-dark); text-decoration: underline; }

/* ---------- MOBILE RESPONSIVE ADDITIONS ---------- */
@media (max-width: 768px) {
    .progress-desc { display: none; }
    .progress-label { font-size: .65rem; }
    .progress-icon { width: 38px; height: 38px; font-size: .9rem; }
    .progress-line { top: 17px; }
    .order-progress { padding-bottom: 16px; }

    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; position: static; }
    .admin-main { width: 100%; }

    .inv-header { flex-direction: column; }
    .inv-grid   { grid-template-columns: 1fr; }
    .inv-footer { flex-direction: column; }
    .inv-body   { padding: 28px 20px; }
}


/* ── Newsolution Brand Logo Styles ─────────────────────────── */
.site-logo {
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
    transition: opacity .2s ease;
}
.logo:hover .site-logo { opacity: 0.85; }

.footer-logo-img {
    height: 42px;
    width: auto;
    filter: brightness(1.15);
}

.admin-logo-img {
    height: 38px;
    width: auto;
    filter: brightness(1.1);
}

/* Override green accent to brand red in key spots */
.btn-primary {
    background: #e8291c;
    border-color: #e8291c;
}
.btn-primary:hover {
    background: #b71c1c;
    border-color: #b71c1c;
    box-shadow: 0 4px 16px rgba(232,41,28,.35);
}

.main-nav {
    background: #2a3840;
    border-top: 3px solid #e8291c;
}

.logo-icon {
    background: linear-gradient(135deg, #e8291c, #b71c1c);
}

.section-title::after { background: #e8291c; }

.cart-badge { background: #e8291c; }

.product-cat-tag a,
.product-cat-tag { color: #b71c1c; }

.price-discount { background: #fde8e8; color: #b71c1c; }

.search-bar form:focus-within { border-color: #e8291c; }
.search-bar button { background: #e8291c; }
.search-bar button:hover { background: #b71c1c; }

.btn-outline { color: #e8291c; border-color: #e8291c; }
.btn-outline:hover { background: #e8291c; color: white; }

.wa-float { background: #25d366; }

.icon-btn:hover { background: #fde8e8; color: #b71c1c; }

.filter-check input { accent-color: #e8291c; }

.page-btn:hover, .page-btn.active { background: #e8291c; border-color: #e8291c; }

.tag-success { background: #fde8e8; color: #b71c1c; }

.admin-nav a:hover, .admin-nav a.active { background: rgba(232,41,28,.12); }

.stat-card-icon { color: #e8291c; }

.progress-step.done .progress-icon { border-color: #e8291c; color: #e8291c; background: #fde8e8; }
.progress-step.current .progress-icon { border-color: #e8291c; background: #e8291c; }
.progress-line.done { background: #e8291c; }

.rating-bar-fill { background: #e8291c; }

.footer-social a:hover { background: #e8291c; }
