/* ==========================================================================
   COMPANY TECHNOLOGY - TEMPLATE 277
   Electronics & High-Tech E-Commerce matching cover.jpg original draft
   ========================================================================== */

:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --accent-red: #e53935;
  --accent-green: #7cb342;
  --dark-sidebar: #4b5563;
  --dark-sidebar-hover: #1f2937;
  --sidebar-header: #e5e7eb;
  --navy: #0f172a;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --max-w: 100%;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* ==========================================================================
   1. TOPBAR & MAIN HEADER
   ========================================================================== */

.topbar {
  background: var(--navy);
  color: #94a3b8;
  font-size: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-info {
  display: flex;
  gap: 20px;
  align-items: center;
}

.topbar-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.site-header-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo {
  height: 72px;
  max-height: 78px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.header-logo:hover {
  transform: scale(1.02);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 25px;
  list-style: none;
}

.header-nav a {
  color: #374151;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 4px;
  transition: color 0.2s ease;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-icon-btn {
  color: #374151;
  font-size: 18px;
  padding: 6px;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
}

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

.header-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 17px;
  color: var(--accent-red);
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  transition: all 0.2s ease;
}

.header-cart-btn:hover {
  background: #fee2e2;
  transform: translateY(-1px);
}

.header-cart-btn .cart-count {
  font-size: 15px;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--navy);
  cursor: pointer;
}

/* ==========================================================================
   2. HERO BANNER SECTION (Contained to max-width, strictly aligned with all sections)
   ========================================================================== */

.hero-section {
  max-width: var(--max-w);
  margin: 25px auto 45px auto;
  padding: 0 40px;
  width: 100%;
}

.hero-banner-box {
  width: 100%;
  min-height: 560px;
  border-radius: var(--radius-md);
  background: #0b1120 url('images/hero1.jpg') left center / cover no-repeat;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
}

.hero-banner-overlay {
  width: 100%;
  height: 100%;
  min-height: 560px;
  background: linear-gradient(270deg, #0b1120 0%, rgba(11, 17, 32, 0.94) 42%, rgba(11, 17, 32, 0.6) 65%, rgba(11, 17, 32, 0) 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 50px 60px;
}

.hero-content-area {
  max-width: 620px;
  color: #ffffff;
}

.hero-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 16px;
}

.hero-main-title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.18;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-main-desc {
  font-size: 15.5px;
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 26px;
}

.hero-btns-wrap {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.btn-hero-red {
  background: var(--accent-red);
  color: #ffffff;
  padding: 13px 26px;
  border-radius: 4px;
  font-size: 14.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(229, 57, 53, 0.35);
  transition: all 0.2s ease;
}

.btn-hero-red:hover {
  background: #d32f2f;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(229, 57, 53, 0.45);
  color: #ffffff;
}

.btn-hero-dark {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  padding: 13px 24px;
  border-radius: 4px;
  font-size: 14.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-hero-dark:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  color: #ffffff;
}

.hero-trust-list {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 600;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
}

.hero-trust-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust-list i {
  color: #4ade80;
}

/* ==========================================================================
   3. MAIN E-COMMERCE LAYOUT (Left Sidebar Menu + 4-Column Product Grid)
   ========================================================================== */

.ecommerce-container {
  max-width: var(--max-w);
  margin: 40px auto 70px auto;
  padding: 0 40px;
  display: flex;
  gap: 30px;
  align-items: flex-start;
  width: 100%;
}

/* Left Sidebar */
.category-sidebar {
  width: 250px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sidebar-header {
  background-color: var(--sidebar-header);
  color: #111827;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 14px 20px;
  text-align: center;
  border-bottom: 2px solid #cbd5e1;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-item {
  border-bottom: 1px solid #374151;
}

.sidebar-item:last-child {
  border-bottom: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--dark-sidebar);
  color: #ffffff;
  padding: 13px 20px;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-link:hover,
.sidebar-link.active {
  background-color: var(--dark-sidebar-hover);
  color: #38bdf8;
  padding-left: 24px;
}

.sidebar-link i {
  font-size: 12px;
  opacity: 0.7;
}

/* Right Content Area */
.catalog-content {
  flex: 1;
  min-width: 0;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 15px;
}

.catalog-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}

.catalog-count {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* 4-Column Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Product Card */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Card Image Box */
.card-img-box {
  position: relative;
  height: 200px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.card-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.product-card:hover .card-img-box img {
  transform: scale(1.06);
}

.badge-offerta {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--accent-red);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 2px;
  z-index: 2;
}

.btn-quick-cart {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--accent-green);
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(124, 179, 66, 0.4);
  transition: all 0.2s ease;
}

.btn-quick-cart:hover {
  background-color: #689f38;
  transform: scale(1.1);
}

/* Card Body */
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  margin-bottom: 6px;
}

.card-title a:hover {
  color: var(--primary);
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-category {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
  display: inline-block;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.card-price {
  font-size: 19px;
  font-weight: 800;
  color: var(--accent-red);
  letter-spacing: -0.3px;
}

.card-old-price {
  font-size: 13px;
  color: #9ca3af;
  text-decoration: line-through;
  margin-right: 8px;
  font-weight: 500;
}

/* ==========================================================================
   4. SECONDARY HERO & PROMOTIONAL BANNER
   ========================================================================== */

/* ==========================================================================
   4. DUAL PROMOTIONAL BANNERS (2 Banners Side by Side / Affiancati)
   ========================================================================== */

.promo-dual-section {
  max-width: var(--max-w);
  margin: 45px auto 65px auto;
  padding: 0 40px;
  width: 100%;
}

.promo-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  width: 100%;
}

.promo-half-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  background-size: cover;
  background-position: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.promo-half-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
}

.promo-card-left {
  background-image: url('images/hero2.jpg');
}

.promo-card-right {
  background-image: url('images/hero3.jpg');
}

.promo-half-overlay {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.88) 100%);
  padding: 35px 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  color: #ffffff;
}

.promo-half-tag {
  display: inline-block;
  background: var(--accent-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.promo-half-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.25;
}

.promo-half-card p {
  font-size: 13.5px;
  color: #e2e8f0;
  line-height: 1.5;
  margin-bottom: 18px;
  max-width: 480px;
}

.btn-promo-half {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.btn-promo-half:hover {
  background: #0284c7;
  transform: translateY(-2px);
  color: #ffffff;
}

/* ==========================================================================
   5. BENEFITS BAR
   ========================================================================== */

.benefits-section {
  max-width: var(--max-w);
  margin: 45px auto 60px auto;
  padding: 0 40px;
  width: 100%;
}

.benefits-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 35px 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.benefit-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.benefit-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.benefit-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}

.benefit-box p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */

.site-footer {
  background-color: var(--navy);
  color: #94a3b8;
  margin-top: auto;
  padding-top: 60px;
  border-top: 3px solid var(--primary);
}

.footer-top {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 40px 50px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

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

.footer-brand-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 380px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 13.5px;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: #38bdf8;
  transform: translateX(4px);
}

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

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.footer-contact-list i {
  color: var(--primary);
  margin-top: 3px;
}

.footer-bottom {
  background-color: #0b1120;
  padding: 20px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 12.5px;
}

/* ==========================================================================
   7. TOAST NOTIFICATION FOR CART
   ========================================================================== */

.cart-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--navy);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--accent-green);
}

.cart-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.cart-toast-btn {
  background-color: var(--accent-red);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 10px;
}



/* ==========================================================================
   CENTERED HEADINGS HELPER
   ========================================================================== */

.section-head-center {
  text-align: center;
  margin-bottom: 35px;
}

.section-head-center h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.section-head-center p {
  color: var(--text-muted);
  font-size: 14.5px;
}

/* ==========================================================================
   CATEGORIES SHOWCASE (Centered 5 Cards)
   ========================================================================== */

.categories-showcase-section {
  max-width: var(--max-w);
  margin: 50px auto 40px auto;
  padding: 0 40px;
  width: 100%;
}

.categories-cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  width: 100%;
}

.category-card-photo {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.category-card-photo:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

.cat-photo-box {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px;
  overflow: hidden;
}

.cat-photo-box img {
  max-height: 120px;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.category-card-photo:hover .cat-photo-box img {
  transform: scale(1.07);
}

.category-card-photo h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.category-card-photo span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   FLASH DEALS (Centered Section with Timer)
   ========================================================================== */

.flash-deals-section {
  max-width: var(--max-w);
  margin: 45px auto 45px auto;
  padding: 0 40px;
  width: 100%;
}

.flash-deals-container {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 12px;
  padding: 35px 30px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  width: 100%;
}

.flash-deals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 18px;
}

.flash-title-area h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash-title-area p {
  color: #94a3b8;
  font-size: 13.5px;
}

.flash-timer-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  color: #cbd5e1;
}

.timer-digits {
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 0.8px;
  font-family: monospace;
  font-size: 15px;
}

.flash-deals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}

.flash-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  padding: 18px;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease;
}

.flash-card:hover {
  transform: translateY(-4px);
}

.flash-discount-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent-red);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 3px;
  z-index: 2;
}

.flash-img-box {
  height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.flash-img-box img {
  max-height: 150px;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.flash-card:hover .flash-img-box img {
  transform: scale(1.05);
}

.flash-stock-bar {
  margin: 10px 0 14px 0;
}

.stock-text {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 5px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 3px;
}

/* ==========================================================================
   TOP PICKS (Centered 4-Column Grid)
   ========================================================================== */

.top-picks-section {
  max-width: var(--max-w);
  margin: 55px auto 45px auto;
  padding: 0 40px;
  width: 100%;
}

.top-picks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}

/* ==========================================================================
   CUSTOMER REVIEWS (3 Centered Cards)
   ========================================================================== */

.reviews-section {
  max-width: var(--max-w);
  margin: 55px auto 45px auto;
  padding: 0 40px;
  width: 100%;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.review-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.review-stars {
  color: #f59e0b;
  margin-bottom: 12px;
  font-size: 14px;
}

.review-text {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  font-style: italic;
  margin-bottom: 18px;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e0f2fe;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.author-info strong {
  display: block;
  font-size: 13.5px;
  color: var(--navy);
}

.author-info span {
  font-size: 11.5px;
  color: #16a34a;
  font-weight: 600;
}

/* ==========================================================================
   BRAND PARTNERS STRIP
   ========================================================================== */

.brands-strip-section {
  max-width: var(--max-w);
  margin: 35px auto 45px auto;
  padding: 0 40px;
  width: 100%;
}

.brands-strip {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px 30px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}

.brand-pill {
  font-size: 15px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.brand-pill:hover {
  color: var(--navy);
}

/* ==========================================================================
   NEWSLETTER VIP BOX
   ========================================================================== */

.newsletter-section {
  max-width: var(--max-w);
  margin: 45px auto 70px auto;
  padding: 0 40px;
  width: 100%;
}

.newsletter-box {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
  border-radius: 12px;
  padding: 45px 35px;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.newsletter-box h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.newsletter-box p {
  color: #94a3b8;
  font-size: 14.5px;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 520px;
  margin: 24px auto 0 auto;
  flex-wrap: wrap;
}

.newsletter-input {
  flex: 1;
  min-width: 260px;
  padding: 13px 18px;
  border-radius: 4px;
  border: none;
  font-size: 14px;
  outline: none;
}

.newsletter-btn {
  background: var(--accent-red);
  color: #ffffff;
  border: none;
  padding: 13px 25px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.newsletter-btn:hover {
  background: #d32f2f;
}

/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1280px) {
  .categories-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .flash-deals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .top-picks-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-tech-container {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .hero-headline {
    font-size: 34px;
  }
  .categories-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .flash-deals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .ecommerce-container {
    flex-direction: column;
  }
  .category-sidebar {
    width: 100%;
  }
  .sidebar-menu {
    display: flex;
    flex-wrap: wrap;
  }
  .sidebar-item {
    flex: 1;
    min-width: 140px;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .top-picks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .promo-dual-grid {
    grid-template-columns: 1fr;
  }
  .benefits-inner {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-logo {
    height: 56px;
  }
  .hero-banner-box {
    min-height: 440px;
  }
  .hero-banner-overlay {
    padding: 30px 24px;
    min-height: 440px;
    justify-content: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  }
  .hero-main-title {
    font-size: 28px;
  }
  .mobile-toggle {
    display: block;
  }
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }
  .header-nav.show {
    display: flex;
  }
  .categories-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .flash-deals-grid {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .top-picks-grid {
    grid-template-columns: 1fr;
  }
  .benefits-inner {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   PAGE SPECIFIC STYLES (Consolidated from in-page <style> tags)
   ========================================================================== */

/* Extracted from contatti.php */
.contact-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 40px;
      align-items: start;
    }
    @media (max-width: 900px) {
      .contact-grid {
        grid-template-columns: 1fr;
      }
    }
    .contact-box {
      background: #ffffff;
      border: 1px solid var(--border-color);
      border-radius: 6px;
      padding: 35px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .contact-item {
      display: flex;
      gap: 16px;
      margin-bottom: 24px;
    }
    .contact-icon {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: #eff6ff;
      color: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.15rem;
      flex-shrink: 0;
    }
    .form-group {
      margin-bottom: 16px;
    }
    .form-group label {
      display: block;
      font-size: 13px;
      font-weight: 700;
      color: var(--navy);
      margin-bottom: 6px;
    }
    .form-control {
      width: 100%;
      padding: 11px 14px;
      border: 1px solid var(--border-color);
      border-radius: 4px;
      font-family: inherit;
      font-size: 14px;
      color: var(--text-dark);
      background: #ffffff;
      transition: border-color 0.2s;
    }
    .form-control:focus {
      outline: none;
      border-color: var(--primary);
    }


/* Responsive Layout Grid Utilities (Auto-migrated from inline styles) */
.grid-2col-responsive {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.grid-split-responsive {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}
.grid-split-rev-responsive {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}
.grid-3col-responsive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.grid-4col-responsive {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .grid-4col-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3col-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-split-responsive,
  .grid-split-rev-responsive {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .grid-2col-responsive,
  .grid-3col-responsive,
  .grid-4col-responsive,
  .grid-split-responsive,
  .grid-split-rev-responsive {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile Safeguard Rules */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}


/* Comprehensive Mobile Polish (360px - 768px) */
@media (max-width: 768px) {
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  button, .btn, .nav-link, a.btn {
    min-height: 42px;
  }
  
  h1, .hero-title, .page-hero-title {
    font-size: clamp(1.6rem, 5vw, 2.4rem) !important;
    line-height: 1.25 !important;
  }
  h2, .section-title, .shelf-title {
    font-size: clamp(1.3rem, 4vw, 1.8rem) !important;
    line-height: 1.3 !important;
  }
  
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .grid-2col-responsive,
  .grid-3col-responsive,
  .grid-4col-responsive,
  .grid-split-responsive,
  .grid-split-rev-responsive {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
    width: 100% !important;
    box-sizing: border-box;
  }
}
