/* =============================================
   MICROSHOP — Design System
   Premium telecom website CSS (Light Theme Redesign)
   ============================================= */

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

/* === TOKENS === */
:root {
  /* Brand Colors */
  --green: #5CB615;
  --green-dark: #4A9311;
  --blue: #019DF4;
  --blue-dark: #0077bb;
  --o2-blue: #0E2D6C;
  --o2-accent: #0050FF;
  --empresas-cyan: #00A9CE;
  --movilfree-pink: #E91E8C;

  /* Theme: Light (Default Movistar) */
  --bg-main: #ffffff;
  --bg-section: #f5f5f5;
  --bg-card: #ffffff;
  
  /* Text */
  --text: #333333;
  --text-muted: #666666;
  --text-light: #ffffff;
  
  /* Utilities */
  --border-color: #e2e8f0;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-badge: 4px;
  --shadow: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 12px 24px rgba(0,0,0,0.12);
  --transition: 0.3s ease;
}

/* === THEME OVERRIDES === */
body.theme-empresas {
  --blue: var(--empresas-cyan);
  --bg-section: #f0f4f8;
}

body.theme-o2 {
  --bg-section: #f5f7fa;
  --green: var(--o2-accent);
}

body.theme-movilfree {
  /* Requested fuchsia background */
  --bg-main: linear-gradient(135deg, #4A0E2E 0%, #1A000E 100%);
  --bg-section: transparent;
  --bg-card: rgba(255,255,255,0.08);
  --text: #ffffff;
  --text-muted: #e2e8f0;
  --border-color: rgba(255,255,255,0.15);
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-main);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}
body.theme-movilfree { min-height: 100vh; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* === HEADER === */
header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
}
.logo img { height: 40px; width: auto; }
.search-bar {
  flex: 1; max-width: 500px;
  position: relative;
  margin: 0 2rem;
}
.search-bar input {
  width: 100%; padding: 0.6rem 1rem 0.6rem 2.5rem;
  border-radius: 50px; border: 1px solid #ccc;
  font-size: 0.9rem; font-family: 'Inter', sans-serif;
}
.header-actions { display: flex; gap: 1.5rem; align-items: center; }
.action-item { display: flex; flex-direction: column; align-items: center; font-size: 0.75rem; color: #555; }
.header-nav {
  display: flex; gap: 1.5rem;
  padding: 0 2rem; height: 44px;
  align-items: center;
  border-top: 1px solid #eee;
  overflow-x: auto;
  white-space: nowrap;
}
.header-nav a {
  font-size: 0.85rem; font-weight: 600; color: #555;
  transition: color var(--transition);
}
.header-nav a:hover, .header-nav a.active { color: var(--blue); }

/* Theme Overrides for Header */
body.theme-o2 header { background: var(--o2-blue); border-bottom: none; }
body.theme-o2 .header-nav { border-top: 1px solid rgba(255,255,255,0.1); }
body.theme-o2 .header-nav a, body.theme-o2 .action-item { color: #ffffff; }
body.theme-o2 .header-nav a:hover, body.theme-o2 .header-nav a.active { color: #fff; font-weight: 800; }

body.theme-movilfree header { background: transparent; border-bottom: 1px solid var(--border-color); }
body.theme-movilfree .header-nav { border-top: 1px solid var(--border-color); }
body.theme-movilfree .header-nav a, body.theme-movilfree .action-item { color: #ffffff; }
body.theme-movilfree .search-bar input { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
body.theme-movilfree .header-nav a:hover, body.theme-movilfree .header-nav a.active { color: var(--movilfree-pink); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: transparent; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: #333; border-radius: 2px; }
body.theme-o2 .hamburger span, body.theme-movilfree .hamburger span { background: #fff; }

.mobile-nav {
  display: none; position: fixed; top: 104px; left: 0; right: 0; bottom: 0;
  background: var(--bg-main); z-index: 999; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.5rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-size: 1.4rem; font-weight: 700; color: var(--text); padding: 0.5rem 2rem; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.7rem 1.4rem;
  border-radius: 50px;
  font-size: 0.9rem; font-weight: 700;
  cursor: pointer; border: none;
  transition: all var(--transition);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }

body.theme-o2 .btn-primary { background: var(--o2-accent); }
body.theme-o2 .btn-primary:hover { background: #0040cc; }
body.theme-o2 .btn-outline { color: var(--o2-accent); border-color: var(--o2-accent); }
body.theme-o2 .btn-outline:hover { background: var(--o2-accent); color: #fff; }

body.theme-movilfree .btn-primary { background: var(--movilfree-pink); }
body.theme-movilfree .btn-primary:hover { background: #c41577; }
body.theme-movilfree .btn-outline { color: var(--movilfree-pink); border-color: var(--movilfree-pink); }
body.theme-movilfree .btn-outline:hover { background: var(--movilfree-pink); color: #fff; }

/* === SECTIONS === */
section { padding: 4rem 2rem; }
.container { max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 2rem; color: var(--text); text-align: center; }

/* === HOME BANNER / HERO === */
.home-banner {
  max-width: 1200px; margin: 2rem auto; border-radius: var(--radius);
  background: #e6f6e6; /* Light green fallback */
  padding: 3rem 2rem; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
}
.home-banner-content { position: relative; z-index: 2; max-width: 500px; }
.home-banner h1 { font-size: 3.5rem; font-weight: 900; color: var(--blue); line-height: 1; margin-bottom: 0.5rem; }
.home-banner p { font-size: 1.2rem; color: var(--blue-dark); font-weight: 600; margin-bottom: 1.5rem; }
.banner-price {
  font-size: 5rem; font-weight: 900; color: var(--text); line-height: 1; display: flex; align-items: flex-start; gap: 5px;
}
.banner-price-cents { font-size: 2.5rem; margin-top: 10px; }
.banner-price-sub { font-size: 0.9rem; font-weight: 600; color: #555; }

/* === CARDS (Movistar Style) === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden; transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card-img-wrap { position: relative; width: 100%; height: 200px; background: #eee; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-badge { display: inline-block; padding: 4px 8px; background: #e0f2fe; color: #0284c7; font-size: 0.75rem; font-weight: 700; border-radius: 4px; margin-bottom: 0.8rem; }
.card-badge.red { background: #fee2e2; color: #dc2626; }
.card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.5rem; line-height: 1.2; }
.card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.card-price { margin-top: auto; font-size: 2rem; font-weight: 900; display: flex; align-items: center; gap: 4px; }
.card-price-small { font-size: 1rem; font-weight: 700; }

.card.dark-card { background: #262626; color: #fff; border: none; }
.card.dark-card .card-body { padding: 2rem; }
.card.dark-card p { color: #ccc; }
.card.blue-card { background: #0066FF; color: #fff; border: none; }
.card.blue-card p { color: #e0e0e0; }

/* === CATEGORIES === */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; }
.category-item {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); padding: 1.5rem 1rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
  text-align: center; transition: all var(--transition); cursor: pointer;
}
.category-item:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.category-item img { width: 60px; height: 60px; object-fit: contain; }
.category-item span { font-size: 0.85rem; font-weight: 600; }

/* === TV PACK SECTION === */
.tv-section { background: #333333; color: #fff; text-align: center; padding: 4rem 2rem; }
.tv-section h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 1rem; }
.tv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 1200px; margin: 2rem auto; text-align: left; }
.tv-card { border-radius: var(--radius); overflow: hidden; position: relative; }
.tv-card img { width: 100%; height: 180px; object-fit: cover; }
.tv-card-info { padding: 1rem 0; }
.tv-card-info h4 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.2rem; }
.tv-card-info p { font-size: 0.9rem; color: #bbb; }

/* === EMPRESAS SPECIFIC === */
.empresas-hero {
  background: linear-gradient(90deg, #e6f4f9 50%, #f0f4f8 100%);
  border-radius: var(--radius); margin: 2rem auto; max-width: 1200px;
  display: flex; align-items: center; overflow: hidden;
}
.empresas-hero-content { padding: 4rem; flex: 1; }
.empresas-hero-img { width: 45%; object-fit: cover; height: 100%; }
.empresas-hero h1 { font-size: 6rem; font-weight: 900; color: var(--blue); line-height: 1; margin-bottom: 1rem; }
.yellow-banner { background: #fde047; padding: 0.8rem; text-align: center; font-weight: 700; font-size: 0.9rem; color: #333; }

/* === O2 SPECIFIC === */
.o2-hero {
  background: url('../img/hero-home.png') center/cover;
  padding: 6rem 2rem; text-align: left;
  border-radius: var(--radius); max-width: 1200px; margin: 2rem auto; position: relative;
}
.o2-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,45,108,0.8) 0%, rgba(14,45,108,0) 100%); border-radius: var(--radius); }
.o2-hero-content { position: relative; z-index: 2; color: #fff; max-width: 500px; }
.o2-hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }

.tariff-selector { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.tariff-btn { padding: 0.5rem 1.5rem; border-radius: 50px; background: #fff; border: 1px solid #ddd; font-weight: 600; cursor: pointer; }
.tariff-btn.active { background: var(--o2-accent); color: #fff; border-color: var(--o2-accent); }

/* === CONTACT / FOOTER SECTION === */
.footer-contact {
  background: #f8fafc; padding: 4rem 2rem; border-top: 1px solid var(--border-color);
}
body.theme-o2 .footer-contact { background: #fff; }
body.theme-movilfree .footer-contact { background: rgba(0,0,0,0.2); }

.contact-wrap { max-width: 600px; margin: 0 auto; text-align: center; }
.form-group { margin-bottom: 1.2rem; text-align: left; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 0.85rem; border-radius: 4px;
  border: 1px solid #ccc; font-family: 'Inter', sans-serif;
}
body.theme-movilfree .form-group input, body.theme-movilfree .form-group textarea, body.theme-movilfree .form-group select {
  background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.3);
}

footer { background: #111; color: #fff; padding: 4rem 2rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; max-width: 1200px; margin: 0 auto 3rem; }
.footer-col h5 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; margin-bottom: 1.2rem; color: #888; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a { font-size: 0.85rem; color: #ccc; transition: color var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #333; padding-top: 2rem; text-align: center; font-size: 0.8rem; color: #888; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .header-top { padding: 0 1rem; }
  .search-bar { display: none; } /* Hide search bar on mobile for simplicity */
  .header-actions { display: none; }
  .hamburger { display: flex; }
  .header-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .empresas-hero { flex-direction: column; }
  .empresas-hero-img { width: 100%; height: 250px; }
  .home-banner { flex-direction: column; text-align: center; padding: 2rem 1rem; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  section { padding: 3rem 1rem; }
  .home-banner h1 { font-size: 2.5rem; }
  .banner-price { font-size: 3.5rem; justify-content: center; }
}
