/* ============================================================
   MR. BAG - CORPORATE DESIGN SYSTEM
   Theme: Minimalist, Light, Formal
   ============================================================ */

:root {
  /* Colors */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-tertiary: #E9ECEF;
  --primary: #00A650;
  --primary-dark: #00823E;
  --primary-light: #E6F6ED;
  --text-dark: #212529;
  --text-muted: #6C757D;
  --border-color: #DEE2E6;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --nav-height: 80px;
  --top-bar-height: 40px;
  --container-width: 1140px;
  
  /* Shadows & Radius */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Transitions */
  --transition: 0.3s ease;
}

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

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

body.inner-page {
  padding-top: calc(var(--nav-height) + var(--top-bar-height));
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================
   UTILITIES
   ========================================================== */
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.bg-light { background-color: var(--bg-secondary); }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }
.section-padding { padding: 80px 0; }
.spacer-lg { height: 80px; }
.rounded { border-radius: var(--radius-md); }
.shadow-sm { box-shadow: var(--shadow-sm); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  border: none;
  gap: 8px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-full {
  width: 100%;
}

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

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

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

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

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.gap-4 { gap: 40px; }
.align-center { align-items: center; }

/* ==========================================================
   TOP BAR & NAVIGATION
   ========================================================== */
.top-bar {
  background-color: var(--bg-secondary);
  height: var(--top-bar-height);
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.top-bar-container {
  display: flex;
  justify-content: space-between;
}

.top-bar-info span, .top-bar-contact a {
  margin-right: 20px;
  color: var(--text-muted);
}

.top-bar-contact a:hover {
  color: var(--primary);
}

.navbar {
  height: var(--nav-height);
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

body:not(.inner-page) .navbar {
  position: absolute;
  top: var(--top-bar-height);
  width: 100%;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo-img {
  height: 40px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 24px;
}

.nav-link {
  font-weight: 500;
  color: var(--text-dark);
  font-size: 0.95rem;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* ==========================================================
   PAGE HEADERS (Inner pages)
   ========================================================== */
.page-header {
  background-color: var(--bg-secondary);
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ==========================================================
   HOME HERO
   ========================================================== */
.hero {
  padding: 120px 0 80px;
  background-color: var(--bg-secondary);
  min-height: calc(100vh - var(--top-bar-height) - var(--nav-height));
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 12px;
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 15px;
}

/* ==========================================================
   PILLARS (Home)
   ========================================================== */
.section-header {
  margin-bottom: 50px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 10px;
}

.pillar-card {
  padding: 30px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.pillar-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 20px;
}

/* ==========================================================
   CATEGORY OVERVIEW (Home)
   ========================================================== */
.overview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.category-card {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #fff;
  color: inherit;
}

.category-card:hover {
  box-shadow: var(--shadow-md);
  color: inherit;
}

.category-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.category-info {
  padding: 20px;
}

.category-info h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.category-info span {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
}

/* ==========================================================
   NOSOTROS (About Page)
   ========================================================== */
.card-light {
  padding: 40px 30px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

/* ==========================================================
   PRODUCTOS (Catalog Page)
   ========================================================== */
.products-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 30px;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.product-img-box {
  position: relative;
  height: 220px;
  border-bottom: 1px solid var(--bg-secondary);
}

.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.product-body {
  padding: 20px;
}

.product-body h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.product-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.link-action {
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ==========================================================
   CONTACTO (Contact Page)
   ========================================================== */
.corporate-contact-list {
  list-style: none;
}

.corporate-contact-list li {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.corporate-contact-list .icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-form-card {
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  transition: border-color var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  background-color: var(--text-dark);
  color: #fff;
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  height: 40px;
  filter: brightness(0) invert(1);
  margin-bottom: 20px;
}

.footer-desc {
  color: #ADB5BD;
  font-size: 0.9rem;
  max-width: 300px;
}

.footer h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 12px;
}

.footer ul a {
  color: #ADB5BD;
}

.footer ul a:hover {
  color: #fff;
}

.contact-list i {
  color: var(--primary);
  margin-right: 10px;
  width: 16px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #ADB5BD;
  font-size: 0.85rem;
}

/* ==========================================================
   RESPONSIVE DESIGN
   ========================================================== */
@media (max-width: 992px) {
  .hero-title { font-size: 2.5rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .top-bar { display: none; }
  body.inner-page { padding-top: var(--nav-height); }
  body:not(.inner-page) .navbar { top: 0; }
  
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-menu.active { display: flex; }
  .nav-list { flex-direction: column; width: 100%; text-align: center; }
  
  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-image-container { display: none; } /* Hide image on mobile for simplicity */
  
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .overview-header { flex-direction: column; align-items: flex-start; gap: 20px; }
}
