/* Design System: Bake Sale 2026 - Gimnasio Moderno */

:root {
  --primary: #F37021; /* Orange */
  --secondary: #17532B; /* Deep School Green */
  --bg-warm: #FFFDF7; /* Warm background */
  --text-dark: #2D2D2D;
  --text-light: #FFFFFF;
  --kraft: #EFE6DA;
  --kraft-dark: #D4C4B1;
  --shadow: 0 10px 30px rgba(0,0,0,0.1);
  --border-radius: 20px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-warm);
  background-image: radial-gradient(var(--kraft-dark) 0.5px, transparent 0.5px);
  background-size: 30px 30px;
  background-attachment: fixed;
  color: var(--text-dark);
  line-height: 1.6;
}

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

.handwriting { font-family: 'Caveat', cursive; font-size: 1.5rem; }
.orange { color: var(--primary); }
.green { color: var(--secondary); }
.py-8 { padding: 80px 0; }
.mb-4 { margin-bottom: 20px; }
.mt-4 { margin-top: 20px; }
.p-6 { padding: 40px; }
.w-full { width: 100%; }

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary { background: var(--primary); color: white; box-shadow: 0 5px 15px rgba(243, 112, 33, 0.4); }
.btn-secondary { background: var(--secondary); color: white; box-shadow: 0 5px 15px rgba(23, 83, 43, 0.3); }
.btn-outline { border: 2px solid var(--secondary); color: var(--secondary); margin-left: 10px; }
.btn-ghost { 
    background: transparent; 
    border: 2px solid var(--primary); 
    color: var(--primary); 
    margin-right: 15px;
    padding: 10px 25px;
}

.btn:hover { 
    transform: translateY(-3px) scale(1.02); 
    box-shadow: 0 12px 30px rgba(0,0,0,0.15); 
}

.btn-ghost:hover { 
    background: var(--primary); 
    color: white; 
}

.btn-text {
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    margin-right: 20px;
    position: relative;
    padding: 5px 0;
}

.btn-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.btn-text:hover::after { width: 100%; }

/* Header */
header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-flex { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.logo { 
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.header-logo {
    height: 55px; /* Institutional logo size */
    width: auto;
    display: block;
}

.tagline { 
    font-weight: 700; 
    font-size: 0.75rem; 
    display: block; 
    letter-spacing: 1px; 
    color: var(--primary);
    text-transform: uppercase;
}

@media (max-width: 480px) {
    header .container .logo img.header-logo {
        height: 40px !important;
        width: auto !important;
    }
    .tagline {
        font-size: 0.65rem;
    }
}

.hamburger { display: none; font-size: 2rem; background: none; border: none; color: var(--secondary); cursor: pointer; }

@media (max-width: 768px) {
    .hamburger { display: block; }
    
    #nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-top: 1px solid #EEE;
    }

    #nav-menu.show { display: flex; }

    #nav-menu .btn { 
        width: 100%; 
        margin: 5px 0; 
        text-align: center;
        max-width: none; 
    }
}

/* Hero */
.hero {
  padding: 140px 0 100px;
  background: 
    linear-gradient(rgba(255,253,247,0.85), rgba(255,253,247,0.95)), 
    url('assets/hero.png');
  background-size: cover;
  background-position: center;
  text-align: center;
}

.hero-title { 
    font-size: 3.5rem; 
    line-height: 1.1; 
    margin-bottom: 20px; 
    font-weight: 900; 
    color: var(--secondary);
    text-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Subtle lift */
}

.hero-title .orange {
    text-shadow: 0 1px 2px rgba(243, 112, 33, 0.2);
}

.hero-subtitle { 
    font-size: 1.3rem; 
    max-width: 650px; 
    margin: 0 auto 35px; 
    color: #333; /* Stronger grey for readability */
    font-weight: 500;
}

/* Products Gallery */
.section-header { text-align: center; margin-bottom: 50px; }
.section-title { font-size: 2.5rem; color: var(--secondary); font-weight: 900; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.product-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.15); }

.product-img { width: 100%; height: 220px; object-fit: cover; }
.product-info { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.product-name { font-size: 1.2rem; color: var(--secondary); margin-bottom: 8px; }
.product-desc { font-size: 0.9rem; color: #666; margin-bottom: 15px; min-height: 48px; }

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  background: #F8F8F8;
  padding: 10px 15px;
  border-radius: 12px;
}

.price { font-weight: 900; color: var(--primary); font-size: 1.2rem; }
.qty-ctrl { display: flex; align-items: center; gap: 15px; }

.q-btn {
  background: white; border-radius: 50%; width: 32px; height: 32px; border: none;
  font-weight: bold; cursor: pointer; color: var(--secondary); box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: background 0.3s;
}

.add-btn {
    background: var(--secondary);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.add-btn:hover {
    background: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(243, 112, 33, 0.3);
}

.add-btn i { font-size: 1.1rem; }

.q-btn:hover { background: var(--secondary); color: white; }

/* Checkout Section */
.checkout-bg { background: var(--kraft); border-radius: 60px 60px 0 0; }
.checkout-grid { display: grid; grid-template-columns: 1fr 400px; gap: 40px; padding: 100px 20px; }

@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }

.card { background: white; border-radius: 30px; box-shadow: 0 15px 40px rgba(0,0,0,0.05); }

form { display: flex; flex-direction: column; gap: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
.form-group label { display: block; margin-bottom: 5px; font-weight: 700; font-size: 0.9rem; color: var(--secondary); }

input, textarea, select {
  width: 100%; padding: 12px; border: 2px solid #F0F0F0; border-radius: 12px;
  font-family: inherit; font-size: 0.95rem; transition: border-color 0.3s;
  background: white;
}

input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); }

.var-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23F37021' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    appearance: none;
    padding-right: 35px;
}

.summary-card { position: sticky; top: 100px; border-radius: 30px; border: 2px dashed var(--kraft-dark); }
.summary-item-styled {
    padding: 15px; background: #FDFDFD; border-radius: 15px; margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); border: 1px solid #EEE;
}
.small-q-btn { width: 24px; height: 24px; border: none; border-radius: 50%; cursor: pointer; background: #EEE; transition: background 0.3s; }
.remove-btn { background: transparent; border: none; color: #CC0000; font-size: 1.2rem; cursor: pointer; float: right; }
.summary-total { border-top: 2px solid #EEE; padding-top: 20px; font-size: 1.4rem; font-weight: 900; color: var(--secondary); display: flex; justify-content: space-between; }

/* Overlay Animations */
.overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255,255,255,0.98); display: none; flex-direction: column;
  justify-content: center; align-items: center; z-index: 2000; text-align: center;
}

.loader-content, .success-content { animation: fadeIn 0.5s ease; width: 90%; max-width: 450px; }

.chef-hat-anim { font-size: 5rem; animation: bounce 1s infinite alternate; }
.heart-anim { font-size: 4rem; animation: pulse 1.5s infinite; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-30px); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
