/* ============================================================
   MaxHardware.lk – Main Stylesheet
   Bootstrap 5 + Custom
============================================================ */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

:root {
  --dark:    #1a1a2e;
  --accent:  #f59e0b;
  --text:    #374151;
  --muted:   #6b7280;
  --light:   #f9fafb;
  --radius:  14px;
}

* { box-sizing: border-box; }
body { font-family: 'Inter', 'Segoe UI', sans-serif; color: var(--text); scroll-behavior: smooth; }
.fw-900 { font-weight: 900 !important; }

/* ── Top Bar ─────────────────────────────────────────────── */
.top-bar {
  background: var(--dark);
  color: rgba(255,255,255,.65);
  font-size: .78rem;
  padding: .4rem 0;
}
.top-bar a { color: rgba(255,255,255,.65); text-decoration: none; }
.top-bar a:hover { color: var(--accent); }

/* ── Promo Banner ────────────────────────────────────────── */
.promo-banner {
  background: linear-gradient(90deg, #d97706, var(--accent));
  color: #fff;
  font-size: .82rem;
  padding: .45rem 0;
  font-weight: 600;
}
.promo-banner a { color: #fff; }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  padding: .65rem 0;
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.12); }
.brand-logo { font-weight: 900; font-size: 1.4rem; color: var(--dark); letter-spacing: -.5px; line-height: 1; }
.brand-logo span { color: var(--accent); }
.brand-sub { font-size: .65rem; color: var(--muted); display: block; }
.nav-link { font-weight: 600; font-size: .875rem; color: var(--dark) !important; padding: .5rem .75rem !important; border-radius: 8px; transition: .15s; }
.nav-link:hover, .nav-link.active { color: var(--accent) !important; background: #fef3c7; }
.nav-cart-btn { background: var(--dark); color: #fff !important; border-radius: 50px; padding: .4rem 1rem; font-size: .85rem; font-weight: 700; position: relative; transition: .2s; }
.nav-cart-btn:hover { background: var(--accent); }
.cart-count { position: absolute; top: -8px; right: -8px; background: #ef4444; color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: .65rem; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.dropdown-item { font-size: .875rem; font-weight: 600; }
.dropdown-item:hover { background: #fef3c7; color: var(--dark); }
.flash-message { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 9999; min-width: 320px; text-align: center; border-radius: 50px; font-weight: 600; padding: .75rem 1.5rem; }

/* ── Hero ────────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--dark) 0%, #16213e 50%, #0f3460 100%);
  padding: 4rem 0;
  overflow: hidden;
}
.hero-tag { display: inline-block; background: rgba(245,158,11,.15); color: var(--accent); border: 1px solid rgba(245,158,11,.3); border-radius: 50px; font-size: .78rem; font-weight: 700; padding: .3rem .85rem; letter-spacing: .5px; margin-bottom: .75rem; }
.hero-title { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900; color: #fff; line-height: 1.15; margin-bottom: 1rem; }
.hero-title .highlight { color: var(--accent); }
.hero-desc { color: rgba(255,255,255,.7); font-size: 1.05rem; margin-bottom: 1.5rem; }
.btn-hero-primary { background: var(--accent); color: var(--dark); font-weight: 800; border: none; border-radius: 50px; padding: .75rem 1.75rem; }
.btn-hero-primary:hover { background: #fbbf24; color: var(--dark); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245,158,11,.4); }
.btn-hero-outline { background: transparent; color: #fff; font-weight: 700; border: 2px solid rgba(255,255,255,.3); border-radius: 50px; padding: .75rem 1.75rem; }
.btn-hero-outline:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.6); }
.hero-img-wrap { position: relative; }
.hero-img-wrap img { border-radius: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.hero-badge { position: absolute; background: #fff; border-radius: 16px; padding: .75rem 1rem; box-shadow: 0 8px 24px rgba(0,0,0,.15); display: flex; align-items: center; gap: .5rem; }
.badge-1 { bottom: 20px; left: -20px; }
.badge-2 { top: 20px; right: -15px; }
.hb-num { font-size: 1.5rem; }
.hb-label { font-size: .72rem; font-weight: 700; line-height: 1.2; color: var(--dark); }

/* ── Features Strip ──────────────────────────────────────── */
.features-strip { background: #fff; box-shadow: 0 4px 24px rgba(0,0,0,.06); padding: 1.25rem 0; }
.feature-item { display: flex; align-items: center; gap: .75rem; }
.fi-icon { width: 44px; height: 44px; background: #fef3c7; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 1.1rem; flex-shrink: 0; }
.fi-title { font-weight: 700; font-size: .875rem; color: var(--dark); }
.fi-sub { font-size: .75rem; color: var(--muted); }

/* ── Section Helpers ─────────────────────────────────────── */
.section-tag { display: inline-block; background: #fef3c7; color: #b45309; border-radius: 50px; font-size: .75rem; font-weight: 700; padding: .25rem .75rem; letter-spacing: .5px; margin-bottom: .5rem; }
.section-title { font-size: 1.75rem; font-weight: 900; color: var(--dark); }
.view-all-link { color: var(--accent); text-decoration: none; font-weight: 700; font-size: .9rem; }
.view-all-link:hover { color: #b45309; }

/* ── Category Cards ──────────────────────────────────────── */
.cat-card { display: flex; flex-direction: column; align-items: center; background: #fff; border-radius: var(--radius); padding: 1.5rem 1rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); text-decoration: none; transition: .25s; border: 2px solid transparent; }
.cat-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.1); }
.cat-icon { width: 60px; height: 60px; background: linear-gradient(135deg, #fef3c7, #fde68a); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--accent); margin-bottom: .75rem; }
.cat-name { font-weight: 700; font-size: .875rem; color: var(--dark); text-align: center; }

/* ── Product Cards ───────────────────────────────────────── */
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); transition: .25s; position: relative; height: 100%; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: 0 12px 36px rgba(0,0,0,.12); transform: translateY(-4px); }
.badge-sale { position: absolute; top: 10px; left: 10px; background: #ef4444; color: #fff; border-radius: 50px; font-size: .7rem; font-weight: 800; padding: .2rem .6rem; z-index: 2; }
.badge-featured { position: absolute; top: 10px; right: 10px; background: var(--accent); color: var(--dark); border-radius: 50px; font-size: .7rem; font-weight: 800; padding: .2rem .6rem; z-index: 2; }
.product-img-wrap { display: block; overflow: hidden; background: var(--light); aspect-ratio: 1; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-body { padding: .85rem; display: flex; flex-direction: column; flex-grow: 1; }
.product-cat a { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); text-decoration: none; }
.product-name a { font-weight: 700; font-size: .875rem; color: var(--dark); text-decoration: none; display: block; margin: .25rem 0; line-height: 1.3; }
.product-name a:hover { color: var(--accent); }
.product-brand { font-size: .72rem; color: var(--muted); margin-bottom: .35rem; }
.product-price { margin-top: auto; padding-top: .35rem; }
.price-sale, .price-normal { font-size: 1rem; font-weight: 900; color: var(--dark); }
.price-old { font-size: .8rem; color: var(--muted); text-decoration: line-through; margin-left: .3rem; }
.product-actions { display: flex; gap: .4rem; margin-top: .65rem; }

/* ── CTA Section ─────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--dark) 0%, #0f3460 100%);
  padding: 4rem 0;
  border-radius: 24px;
  margin: 2rem 0;
}
.cta-title { font-size: 2rem; font-weight: 900; color: #fff; }

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--dark), #16213e);
  padding: 1.75rem 0;
  color: #fff;
}
.page-title { font-size: 1.75rem; font-weight: 900; color: #fff; margin: 0; }
.breadcrumb-item a { color: rgba(255,255,255,.6); text-decoration: none; }
.breadcrumb-item.active { color: var(--accent); }
.breadcrumb-item+.breadcrumb-item::before { color: rgba(255,255,255,.3); }

/* ── Shop Sidebar ────────────────────────────────────────── */
.sidebar-card { background: #fff; border-radius: var(--radius); padding: 1.25rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.sidebar-heading { font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: var(--dark); border-bottom: 2px solid #f3f4f6; padding-bottom: .5rem; margin-bottom: .75rem; }
.sidebar-cats { list-style: none; padding: 0; margin: 0; }
.sidebar-cats li a { display: block; padding: .45rem .5rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .875rem; transition: .15s; }
.sidebar-cats li a:hover, .sidebar-cats li.active a { background: #fef3c7; color: var(--dark); font-weight: 700; }
.shop-toolbar { background: #fff; padding: .75rem 1rem; border-radius: 12px; box-shadow: 0 1px 8px rgba(0,0,0,.06); }
.empty-state { color: var(--muted); }

/* ── Product Detail ──────────────────────────────────────── */
.product-detail-img { position: relative; border-radius: 20px; overflow: hidden; background: #f9fafb; }
.badge-sale-lg { position: absolute; top: 15px; left: 15px; background: #ef4444; color: #fff; border-radius: 50px; font-size: .8rem; font-weight: 800; padding: .3rem .9rem; z-index: 2; }
.product-detail-title { font-size: 1.7rem; font-weight: 900; color: var(--dark); }
.price-sale-lg { font-size: 2rem; font-weight: 900; color: var(--dark); }
.price-old-lg { font-size: 1.1rem; color: var(--muted); text-decoration: line-through; margin-left: .5rem; }
.qty-selector { display: flex; align-items: center; border: 2px solid #e5e7eb; border-radius: 50px; overflow: hidden; }
.qty-btn { background: none; border: none; width: 40px; height: 42px; font-size: 1.2rem; cursor: pointer; font-weight: 700; }
.qty-btn:hover { background: #f3f4f6; }
.qty-input { border: none; outline: none; text-align: center; width: 56px; font-weight: 700; }
.gallery-thumb { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--accent); }

/* ── Cart ────────────────────────────────────────────────── */
.cart-img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.cart-table-wrap { background: #fff; border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,0,0,.06); overflow: hidden; }
.cart-summary-card { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); }

/* ── Checkout ────────────────────────────────────────────── */
.checkout-card { background: #fff; border-radius: var(--radius); padding: 1.75rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.payment-option { display: flex; align-items: center; gap: 1rem; border: 2px solid #e5e7eb; border-radius: 14px; padding: 1rem; cursor: pointer; margin-bottom: .75rem; transition: .2s; }
.payment-option:hover { border-color: var(--accent); background: #fffbeb; }
.payment-option.selected { border-color: var(--accent); background: #fffbeb; }
.payment-option input[type=radio] { display: none; }
.payment-content { display: flex; align-items: center; gap: 1rem; }
.order-success .success-icon { font-size: 5rem; color: #22c55e; }
.order-summary-box { background: #f9fafb; border-radius: 14px; padding: 1.25rem; max-width: 400px; }

/* ── About ───────────────────────────────────────────────── */
.about-stat { background: #fff; border-radius: 14px; padding: 1rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); text-align: center; }
.as-num { font-size: 1.5rem; font-weight: 900; color: var(--dark); }
.as-label { font-size: .75rem; color: var(--muted); }
.why-card { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); text-align: center; transition: .25s; }
.why-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,.1); }
.why-icon { width: 56px; height: 56px; background: linear-gradient(135deg, #fef3c7, #fde68a); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 1.4rem; margin: 0 auto; }
.brands-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.brand-badge { background: #fff; border: 2px solid #e5e7eb; border-radius: 50px; padding: .5rem 1.25rem; font-weight: 700; font-size: .9rem; color: var(--dark); }

/* ── Contact ─────────────────────────────────────────────── */
.contact-info-card { background: #fff; border-radius: var(--radius); padding: 1.75rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.contact-info-item { display: flex; gap: .85rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid #f3f4f6; }
.ci-icon { width: 40px; height: 40px; background: #fef3c7; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 1.1rem; flex-shrink: 0; }
.ci-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; color: var(--muted); }
.ci-value { font-weight: 600; color: var(--dark); }
.ci-value a { color: var(--dark); }
.social-links-sm a { width: 36px; height: 36px; background: var(--dark); color: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-right: .4rem; font-size: .9rem; text-decoration: none; transition: .2s; }
.social-links-sm a:hover { background: var(--accent); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--dark); color: rgba(255,255,255,.7); }
.footer-top { padding: 3.5rem 0 2.5rem; }
.footer-brand { font-size: 1.5rem; font-weight: 900; color: #fff; margin-bottom: .75rem; }
.footer-brand span { color: var(--accent); }
.footer-desc { font-size: .85rem; line-height: 1.6; margin-bottom: 1rem; }
.social-links a { width: 38px; height: 38px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.65); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-right: .4rem; font-size: .9rem; text-decoration: none; transition: .2s; }
.social-links a:hover { background: var(--accent); color: var(--dark); }
.footer-heading { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links li a { color: rgba(255,255,255,.55); text-decoration: none; font-size: .875rem; transition: .15s; }
.footer-links li a:hover { color: var(--accent); padding-left: 4px; }
.footer-contact-item { display: flex; gap: .75rem; margin-bottom: .85rem; font-size: .85rem; }
.footer-contact-item i { color: var(--accent); margin-top: 3px; }
.footer-contact-item p { margin: 0; color: rgba(255,255,255,.6); }
.footer-bottom { background: rgba(0,0,0,.2); padding: 1rem 0; font-size: .8rem; }
.footer-bottom p { margin: 0; color: rgba(255,255,255,.4); }

/* ── WhatsApp Float ──────────────────────────────────────── */
.whatsapp-float { position: fixed; bottom: 25px; right: 25px; z-index: 8000; }
.whatsapp-float a { width: 58px; height: 58px; background: #25d366; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; box-shadow: 0 4px 20px rgba(37,211,102,.4); text-decoration: none; transition: .25s; }
.whatsapp-float a:hover { transform: scale(1.1); box-shadow: 0 8px 30px rgba(37,211,102,.5); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .hero-section { padding: 2.5rem 0; }
  .cta-section { border-radius: 12px; padding: 2.5rem 1rem; }
  .product-detail-title { font-size: 1.3rem; }
  .price-sale-lg { font-size: 1.5rem; }
  .footer-top { padding: 2rem 0 1.5rem; }
}
