/* =========================================
   Braga Bazaar — CLEAN style.css (Desktop + Mobile like Pingo Doce)
   ========================================= */

/* ---------- Theme ---------- */
:root {
    --primary: #2d7a32;
    --accent: #e31e24;
    --text: #1e293b;
    --muted: #64748b;
    --bg: #f8f9fa;
    --card: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 8px 24px rgba(0,0,0,0.08);
    --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  
    --sidebar-width: 260px;
    --sidebar-collapsed: 80px;
    --header-height: 64px;
  }
  
  /* ---------- Animations ---------- */
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
  }
  @keyframes slideInRight {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* ---------- Base ---------- */
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
  }
  
  /* Accessibility: skip link */
  .skip-link{
    position:absolute;
    top:-3rem;
    left:.75rem;
    background: var(--primary);
    color:#fff;
    padding:.5rem 1rem;
    border-radius: 0 0 10px 10px;
    font-weight:700;
    z-index:9999;
    transition: top .2s ease;
  }
  .skip-link:focus{ top:.5rem; outline:2px solid #0f172a; outline-offset:2px; }
  
  a { color: inherit; text-decoration: none; }
  button { font-family: inherit; }
  
  /* =========================================
     LAYOUT: Sidebar + Main
     ========================================= */
  
  /* Sidebar (Desktop default) */
  .sidebar-menu {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--border);
    z-index: 1100;
    display: flex;
    flex-direction: column;
  }
  
  .sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-header .close-btn{
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #111827;
  }
  
  .sidebar-categories-title{
    padding: 14px 16px 10px;
    margin: 0;
    font-size: .75rem;
    letter-spacing: .08em;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
  }
  
  .sidebar-nav { overflow: auto; padding: 6px 0 12px; }
  .sidebar-nav ul{ list-style:none; margin:0; padding:0; }
  
  .nav-item{
    display:flex;
    align-items:center;
    gap: 12px;
    padding: 12px 14px;
    margin: 4px 10px;
    border-radius: 12px;
    color:#111827;
    font-weight: 700;
    transition: background .15s ease, color .15s ease, transform .2s ease;
  }
  .nav-item .icon-box{ width: 28px; text-align:center; font-size: 1.1rem; }
  .nav-item[data-filter="fruits"] .icon-box { color: #2d7a32; }
  .nav-item[data-filter="bakery"] .icon-box { color: #b45309; }
  .nav-item[data-filter="meat"] .icon-box { color: #991b1b; }
  .nav-item[data-filter="eggs"] .icon-box { color: #854d0e; }
  .nav-item[data-filter="drinks"] .icon-box { color: #1e40af; }
  .nav-item[data-filter="promotions"] .icon-box { color: #be123c; }
  .nav-item[data-filter="cans_jars"] .icon-box { color: #475569; }
  .nav-item[data-filter="pasta_rice_cereals"] .icon-box { color: #c2410c; }
  .nav-item[data-filter="sauces_condiments"] .icon-box { color: #6d28d9; }
  .nav-item[data-filter="herbs_spices"] .icon-box { color: #15803d; }
  .nav-item[data-filter="frozen_foods"] .icon-box { color: #0369a1; }
  .nav-item[data-filter="snacks"] .icon-box { color: #a16207; }
  .nav-item[data-filter="household_cleaning"] .icon-box { color: #4f46e5; }
  .nav-item[data-filter="personal_care"] .icon-box { color: #be185d; }
  .nav-item .menu-text{ flex: 1; }
  .nav-item .nav-chevron{ color:#94a3b8; font-size:.8rem; }
  
  .nav-item:hover {
    background: #f0fdf4;
    color: var(--primary);
    transform: translateX(4px);
  }
  .nav-item.active { background: #e9f5e9; color: var(--primary); }
  .nav-item.active .nav-chevron{ color: var(--primary); }
  
  /* Main content sits next to sidebar on desktop */
  #main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
  }
  
  /* Backdrop for mobile drawer */
  .sidebar-backdrop{
    display:none;
    position:fixed;
    inset:0;
    background: rgba(0,0,0,.45);
    z-index:1099;
    border:none;
  }
  
  /* =========================================
     HEADER / TOP NAV
     ========================================= */
  
  .main-header,
  .shared-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: #fff;
    border-bottom: 1px solid var(--border);
  }
  
  .top-nav{
    height: var(--header-height);
    display:flex;
    align-items:center;
    gap: 14px;
    padding: 0 18px;
    max-width: 1400px;
    margin: 0 auto;
  }
  
  /* hamburger (hidden on desktop) */
  .menu-reopen-btn{
    display:none;
    border:none;
    background: transparent;
    cursor:pointer;
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }
  .menu-reopen-btn:hover{ background:#f1f5f9; }
  
  .logo{
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }
  .logo span{ color: var(--primary); }
  
  /* Search bar (desktop inline) */
  .search-bar{
    flex:1;
    display:flex;
    align-items:center;
    max-width: 520px;
    margin-left: 10px;
  }
  .search-bar .search-bar-wrap{
    flex: 1;
    display:flex;
    align-items:center;
    gap: 10px;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 14px 0 0 14px;
    padding: 0 14px;
    height: 42px;
  }
  .search-bar .search-bar-icon{ color:#6b7280; }
  .search-bar input{
    border:none;
    background: transparent;
    outline:none;
    width: 100%;
    font-size: .95rem;
  }
  .search-submit-btn,
  .search-bar button{
    height: 42px;
    border:none;
    cursor:pointer;
    padding: 0 18px;
    border-radius: 0 14px 14px 0;
    background: var(--primary);
    color:#fff;
    font-weight: 800;
  }
  .search-submit-btn:hover,
  .search-bar button:hover{ filter: brightness(.95); }
  
  /* Right actions (orders/account/cart) */
  .site-nav{
    display:flex;
    align-items:center;
    gap: 10px;
    margin-left: auto;
    flex-wrap: nowrap;
  }
  .site-nav-icon-only{
    display:inline-flex;
    align-items:center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    color:#111827 !important;
  }
  .site-nav-icon-only i{ font-size: 1.15rem; color:#111827 !important; }
  .site-nav-icon-only:hover{ background:#f1f5f9; }
  
  .site-nav-cart-total{
    font-weight: 900;
    font-size: .95rem;
    color:#111827 !important;
  }
  
  /* =========================================
     PAGE SECTIONS
     ========================================= */
  
  /* =========================================
     HERO – Premium Split Layout
     ========================================= */

  .hero-split {
    padding: 24px 18px;
    max-width: 1400px;
    margin: 0 auto;
  }

  .hero-split-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    align-items: stretch;
    background: #ffffff;
    border-radius: 22px;
    padding: 32px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    animation: fadeInUp 0.6s ease both;
  }

  .hero-copy { animation: fadeInUp 0.5s ease 0.1s both; }
  .hero-media { animation: fadeInUp 0.5s ease 0.2s both; }
  .hero-badge { animation: slideInRight 0.4s ease 0.5s both; }

  .hero-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.15;
    margin: 0;
    font-weight: 900;
  }

  .hero-subtitle {
    margin-top: 14px;
    font-size: 1.1rem;
    color: #475569;
    max-width: 50ch;
  }

  .hero-actions {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }
  .hero-cta, .hero-cta-ghost {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }
  .hero-cta:hover, .hero-cta-ghost:hover {
    transform: translateY(-2px);
  }
  .hero-cta:active, .hero-cta-ghost:active {
    transform: translateY(0);
  }

  /* ---------- Image side ---------- */

  .hero-media {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    min-height: 260px;
  }

  .hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.5s ease;
  }
  .hero-media:hover img {
    transform: scale(1.06);
  }

  /* Soft dark overlay */
  .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom right,
      rgba(0,0,0,0.15),
      rgba(0,0,0,0.05)
    );
  }

  /* Floating badge */
  .hero-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  }

  /* ---------- Mobile ---------- */

  @media (max-width: 768px) {
    .hero-split-inner {
      grid-template-columns: 1fr;
      padding: 20px;
    }

    .hero-media {
      order: -1;
      min-height: 200px;
    }

    .hero-title {
      font-size: 1.9rem;
    }
  }
  
  .main-shop-section{
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 18px 40px;
    animation: fadeInUp 0.5s ease 0.15s both;
  }
  
  .page-breadcrumb, .section-title{
    font-size: 1.85rem;
    font-weight: 900;
    color: #111827;
    margin: 10px 0 16px;
  }
  .page-breadcrumb b{ color: var(--primary); }

  /* ===== Section title accent ===== */
  .title-accent {
    color: var(--primary);
    font-weight: 900;
  }
  
  /* Filter / Sort bar */
  .filter-sort-bar{
    display:flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items:center;
    padding: 12px 0 18px;
    border-bottom: 1px solid var(--border);
  }
  .filter-check input {
    transition: transform 0.15s ease;
  }
  .filter-check input:hover { transform: scale(1.1); }
  .sort-wrap{ margin-left: auto; display:flex; align-items:center; gap: 8px; }
  .sort-select{
    padding: 10px 12px;
    border:1px solid var(--border);
    border-radius: 12px;
    background:#fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .sort-select:hover { border-color: #94a3b8; }
  .sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45,122,50,0.15);
  }
  
  /* =========================================
     PRODUCT GRID (DESKTOP)
     ========================================= */
  .product-grid{
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 18px;
  }
  
  .product-card{
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow:hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    animation: fadeInUp 0.45s ease both;
  }
  .product-card:nth-child(1){ animation-delay: 0.02s; }
  .product-card:nth-child(2){ animation-delay: 0.05s; }
  .product-card:nth-child(3){ animation-delay: 0.08s; }
  .product-card:nth-child(4){ animation-delay: 0.11s; }
  .product-card:nth-child(5){ animation-delay: 0.14s; }
  .product-card:nth-child(6){ animation-delay: 0.17s; }
  .product-card:nth-child(7){ animation-delay: 0.20s; }
  .product-card:nth-child(8){ animation-delay: 0.23s; }
  .product-card:nth-child(n+9){ animation-delay: 0.26s; }
  .product-card:hover{
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border-color: #d8e8da;
  }
  
  .product-card img{
    width: 100%;
    height: 180px;
    object-fit: cover;
    display:block;
    background: #fff;
    transition: transform 0.4s ease;
  }
  .product-card:hover img{
    transform: scale(1.05);
  }
  
  .product-card .product-info{ padding: 14px; }
  .product-card .brand{ font-size:.75rem; color:#94a3b8; text-transform: uppercase; font-weight: 800; }
  .product-card h3{ margin: 6px 0 8px; font-size: 1rem; }
  .product-card .price{
    font-weight: 900;
    color: var(--primary);
    font-size: 1.05rem;
  }
  .price-old{
    color:#9ca3af;
    text-decoration: line-through;
    font-weight: 700;
    margin-left: 6px;
    font-size: .9rem;
  }
  
  .card-footer{
    padding: 0 14px 14px;
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 10px;
  }
  
  /* Qty + add */
  .quantity-selector{
    display:flex;
    align-items:center;
    gap: 6px;
    background:#f3f4f6;
    border-radius: 12px;
    padding: 6px;
  }
  .qty-btn{
    width: 34px;
    height: 34px;
    border:none;
    background:#fff;
    border-radius: 10px;
    cursor:pointer;
    font-weight: 900;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    transition: transform 0.15s ease, background 0.15s ease;
  }
  .qty-btn:hover { background: #f0fdf4; }
  .qty-btn:active { transform: scale(0.92); }
  .qty-input{
    width: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align:center;
    padding: 6px 0;
    background:#fff;
    font-weight: 800;
  }
  
  .add-to-cart-btn{
    flex: 1;
    border:none;
    cursor:pointer;
    background: var(--primary);
    color:#fff;
    font-weight: 900;
    padding: 12px 14px;
    border-radius: 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap: 8px;
    transition: transform .12s ease, filter .12s ease;
  }
  .add-to-cart-btn:hover{ filter: brightness(.95); transform: translateY(-1px); }
  .add-to-cart-btn:active{ transform: scale(.98); }
  
  /* Checkout overlay – modal, only visible when cart icon clicked */
  #checkout.checkout-section {
    display: none !important;
    position: fixed;
    inset: 0;
    z-index: 2400;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
  }
  #checkout.checkout-section[style*="flex"] {
    display: flex !important;
  }
  #checkout .checkout-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: scaleIn 0.3s ease;
  }
  #checkout .checkout-content h2 { margin-top: 0; }

  /* Modal overlays – fade + scale */
  .modal-animate { animation: fadeIn 0.25s ease; }
  .modal-animate > div { animation: scaleIn 0.3s ease; }
  #userChoiceModal > div,
  #emptyCartOverlay > div {
    animation: scaleIn 0.3s ease;
  }

  /* Product modal animation */
  #productModal {
    animation: fadeIn 0.2s ease;
  }
  #productModal > div {
    animation: scaleIn 0.25s ease;
  }
  #productModal img {
    transition: transform 0.3s ease;
  }
  #productModal:hover img {
    transform: scale(1.02);
  }

  /* Promo badge */
  .promo-badge{
    position:absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color:#fff;
    font-weight: 900;
    font-size: .75rem;
    padding: 6px 10px;
    border-radius: 10px;
  }
  
  /* =========================================
     FOOTER (optional)
     ========================================= */
  .info-banner{
    margin-top: 40px;
    background:#1e2a1e;
    color:#e8ebe8;
    padding: 48px 18px 32px;
  }
  .info-banner .banner-container{
    max-width: 1200px;
    margin:0 auto;
    display:grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 30px;
  }
  .info-banner a{ color:#c8e0c8; }
  .info-banner a:hover{ opacity:.85; }
  .info-banner .banner-bottom{
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.12);
    text-align:center;
    opacity:.9;
  }
  
  /* =========================================
     MOBILE: Pingo Doce behavior
     - ONLY hamburger + logo
     - search row
     - icons row (account/orders/cart)
     - vertical product list
     ========================================= */
  @media (max-width: 768px) {
    /* main content should not leave space for sidebar */
    #main-content{ margin-left: 0; }
  
    /* sidebar becomes off-canvas */
    .sidebar-menu{
      width: 85vw;
      max-width: 320px;
      transform: translateX(-100%);
      transition: transform .22s ease;
      box-shadow: 4px 0 20px rgba(0,0,0,0.18);
    }
    .sidebar-menu.active{ transform: translateX(0); }
    .sidebar-backdrop{ display: none; }
    .sidebar-menu.active + .sidebar-backdrop{ display:block; }
  
    /* header becomes 3 rows */
    .top-nav{
      height: auto;
      padding: 10px 12px;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }
  
    .menu-reopen-btn{ display:inline-flex; align-items:center; justify-content:center; }
    .logo{ flex: 1; min-width: 0; }
  
    /* search takes full row */
    .search-bar{
      order: 3;
      width: 100%;
      max-width: none;
      margin: 0;
    }
  
    /* icons row */
    .site-nav{
      order: 4;
      width: 100%;
      margin-left: 0;
      justify-content: flex-start;
      gap: 10px;
    }
  
    /* If you have shop/contact icons, hide them on phone like Pingo Doce */
    .site-nav .site-nav-shop,
    .site-nav .site-nav-contact{
      display:none !important;
    }
  
    /* page padding tighter */
    .main-shop-section{ padding: 14px 12px 30px; }
  
    /* vertical product list */
    .product-grid{
      grid-template-columns: 1fr;
      gap: 10px;
    }
  
    .product-card{
      border-radius: 16px;
    }
  
    /* list-style card: image small, info compact */
    .product-card img{
      height: 110px;
    }
  
    .product-card .product-info{
      padding: 10px 12px;
    }
  
    .product-card h3{
      font-size: .95rem;
      margin: 4px 0 6px;
    }
  
    .card-footer{
      padding: 0 12px 12px;
      flex-direction: column;
      align-items: stretch;
    }
  
    .add-to-cart-btn{
      width: 100%;
      padding: 12px;
    }
  
    .info-banner .banner-container{
      grid-template-columns: 1fr;
    }
  }
/* =========================
   HERO IMAGE (Right Box)
   - crisp photo + soft green glow
   - looks premium on desktop & mobile
   ========================= */
   .hero-media{
    border-radius: 16px;
    border: 1px solid #eef2f7;
    overflow: hidden;
    position: relative;
    min-height: 260px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.12);
  
    /* IMAGE HERE (Option A: local file) */
    background: url("assets/hero-braga.jpg") center/cover no-repeat;
  }
  
  /* soft overlay for readability / brand */
  .hero-media::after{
    content:"";
    position:absolute;
    inset:0;
    background:
      radial-gradient(120% 90% at 20% 10%, rgba(45,122,50,0.25), transparent 55%),
      linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.22) 100%);
  }
  
  /* subtle hover (desktop only) */
  @media (hover:hover){
    .hero-media{
      transition: transform .25s ease, box-shadow .25s ease;
    }
    .hero-media:hover{
      transform: translateY(-2px);
      box-shadow: 0 18px 42px rgba(0,0,0,0.16);
    }
  }
  
  @media (max-width: 768px){
    .hero-media{ min-height: 190px; }
  }
  .hero-media::before{
    content:"Fresh • Local • Fast";
    position:absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.65);
    color: #0f172a;
    font-weight: 900;
    font-size: 0.9rem;
  }
   