:root{
  --bg:#0a0f2b;          /* deep navy header/footer */
  --ink:#0e1a40;         /* headings */
  --text:#28324d;        /* body text */
  --muted:#6c7693;
  --paper:#f4f6fb;       /* page background */
  --card:#ffffff;
  --brand:#3755ff;       /* candy blue */
  --accent:#ff3aa7;      /* candy pink */
  --ring:rgba(55,85,255,.25);
  --radius:18px;
  --shadow:0 10px 30px rgba(15,30,60,.12);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:"Plus Jakarta Sans",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--text);background:var(--paper)}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:1200px;margin:0 auto;padding:0 20px}

/* ===== Header & Nav ===== */
.site-header{position:sticky;top:0;z-index:50;background:var(--bg);color:#fff}
.site-header .nav{display:flex;align-items:center;gap:20px;height:72px}
.brand{display:flex;align-items:center;gap:12px;color:#fff;font-weight:800;letter-spacing:.3px}

/* FIX 1: keep logo oval (no circular crop) & make it larger */
.logo{
  height:54px;        /* bigger, scales by height */
  width:auto;         /* preserve natural oval aspect */
  border-radius:0;    /* no circle crop */
  display:block;
  object-fit:contain;
}

.main-nav{display:flex;gap:20px;margin-left:auto}
.main-nav a{color:#cfe0ff;font-weight:600}
.main-nav a:hover{color:#fff}
.cart-link{display:flex;align-items:center;gap:8px;color:#fff;background:linear-gradient(90deg,var(--brand),var(--accent));padding:10px 14px;border-radius:999px;box-shadow:0 6px 20px rgba(55,85,255,.35)}
.cart-count{background:#fff;color:var(--ink);padding:2px 8px;border-radius:999px;font-weight:800}
.nav-toggle{display:none;margin-left:auto;background:transparent;border:0;color:#fff;font-size:24px}

@media (max-width: 860px){
  .nav-toggle{display:block}
  .main-nav{position:fixed;inset:72px 0 auto 0;background:var(--bg);padding:20px;flex-direction:column;transform:translateY(-110%);transition:.2s}
  body.nav-open .main-nav{transform:translateY(0)}
}

/* ===== Hero ===== */
.hero{
  background: radial-gradient(80% 60% at 50% 0%, #ffd3ec 0, #ccd7ff 40%, #f4f6fb 70%);
}
.hero-inner{display:grid;grid-template-columns:1.1fr 1fr;gap:30px;align-items:center;padding:70px 0}
@media (max-width:900px){ .hero-inner{grid-template-columns:1fr;padding:42px 0} }
.eyebrow{color:var(--accent);font-weight:800;text-transform:uppercase;letter-spacing:.12em}
.hero h1{color:var(--ink);font-size:44px;line-height:1.1;margin:.3rem 0 1rem;font-weight:900}
.hero p{font-size:18px;color:#2a3250;opacity:.9}
.btn{display:inline-block;background:linear-gradient(90deg,var(--brand),var(--accent));color:#fff;padding:14px 18px;border-radius:14px;font-weight:800;box-shadow:0 8px 24px var(--ring)}
.btn:hover{filter:brightness(.98);text-decoration:none}
.btn.outline{background:#fff;color:var(--brand);border:2px solid var(--brand)}

/* FIX 2: hero visual should be a wide banner and fill the box */
.hero .media{aspect-ratio:16/9}              /* wide, not square */
.hero .media img{object-fit:cover}           /* fill the area fully */

/* ===== Sections / Layout ===== */
.section{padding:60px 0}
.section h2{font-size:32px;color:var(--ink);margin:0 0 16px;font-weight:900}

.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:22px}
@media (max-width:1050px){ .grid{grid-template-columns:repeat(3,1fr)} }
@media (max-width:760px){ .grid{grid-template-columns:repeat(2,1fr)} }
@media (max-width:520px){ .grid{grid-template-columns:1fr} }

/* ===== Cards / Product tiles ===== */
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;border:1px solid #e7ecff}
.card .media{aspect-ratio:1/1;background:#eef2ff;display:flex;align-items:center;justify-content:center}
/* Keep product images contained so pouches don't crop; hero overrides above */
.card img{width:100%;height:100%;object-fit:contain}
.card .pad{padding:14px}
.price{font-weight:800;color:var(--ink)}
.old-price{text-decoration:line-through;color:var(--muted);font-weight:600;margin-right:8px}
.badge{display:inline-block;background:#ecf0ff;color:#334; padding:6px 10px;border-radius:999px;font-weight:800;font-size:12px}

.qty{display:flex;align-items:center;gap:10px}
.qty input{width:64px;padding:10px;border-radius:12px;border:1px solid #d8def7}

/* ===== Tables ===== */
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:12px;border-bottom:1px solid #e8ecff;text-align:left}
.table img{width:60px;height:60px;object-fit:cover;border-radius:12px}

/* ===== Footer ===== */
.site-footer{background:var(--bg);color:#dbe6ff;margin-top:60px;padding:40px 0 16px}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:20px}
.footer-grid h4,.footer-grid h5{color:#fff;margin:0 0 10px}
.footer-grid ul{list-style:none;margin:0;padding:0}
.footer-grid li{margin:6px 0}
.footer-bottom{border-top:1px solid rgba(255,255,255,.12);margin-top:20px;padding-top:12px;text-align:center}
.muted{color:#c1ccff}
/* ===========================
   Mobile-friendly enhancements
   =========================== */

/* Containers */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
}

/* Make images behave on small screens */
img {
  max-width: 100%;
  height: auto;
}

/* Tables: allow horizontal scroll on small screens */
.table {
  width: 100%;
  border-collapse: collapse;
}
@media (max-width: 800px) {
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* Buttons: improve touch sizing on small screens (don’t force full width globally) */
@media (max-width: 540px) {
  .btn { padding: 12px 16px; }
  .btn.outline { padding: 10px 16px; }
}

/* ---------- Header: hamburger nav ---------- */
/* On desktop: show nav links, hide hamburger (you already do this inline) */
/* On mobile: hide links, show hamburger; when body.nav-open => show menu panel */

@media (max-width: 900px) {
  .nav-toggle { display: block !important; } /* your inline has display:none */
  .main-nav {
    display: none !important;               /* override inline display:flex */
  }
  body.nav-open .main-nav {
    display: flex !important;
    position: fixed;
    top: 72px;             /* header height */
    left: 0;
    right: 0;
    background: #0a0f2b;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px 20px;
    border-top: 1px solid rgba(255,255,255,.08);
    z-index: 9998;
  }
  .main-nav a {
    color: #cfe0ff !important;
    font-weight: 700;
    padding: 10px 2px;
    border-radius: 8px;
  }

  /* Brand area: keep tidy on small screens */
  .site-header .brand span {
    font-size: 15px;
  }
  .cart-link {
    padding: 8px 12px !important;
  }
}

/* Extra-small phones: reduce header crowding a bit */
@media (max-width: 420px) {
  .site-header .brand span {
    display: none; /* hide “Big Lake Candy Company” text, keep logo */
  }
}

/* ---------- Footer: responsive grid ---------- */
/* You used inline grid-template-columns on .footer-grid.
   Override on smaller screens with !important. */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }
}
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px !important;
  }
}

/* ---------- Cards & grids generally ---------- */
@media (max-width: 900px) {
  /* Generic .grid helper fallback if you use it in pages */
  .grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- Forms & inputs ---------- */
@media (max-width: 700px) {
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  textarea,
  select {
    width: 100%;
  }
}

/* ---------- Cart/Checkout layout splits ---------- */
@media (max-width: 950px) {
  /* Your checkout/cart sometimes use 2-column grids inline:
     We'll stack them on mobile by overriding via display block. */
  .section .container[style*="grid-template-columns"] {
    display: block !important;
  }
  .section .container > aside {
    margin-top: 16px;
  }
}

/* ---------- Alert bar tweaks on mobile ---------- */
@media (max-width: 600px) {
  .blcc-topbar .container {
    padding-right: 38px; /* keep space for the close button */
  }
  .blcc-topbar .close {
    font-size: 20px;
  }
}

/* ---------- Utility: make links easier to tap ---------- */
@media (hover: none) and (pointer: coarse) {
  a, button {
    min-height: 40px;
  }
}
/* ===========================
   Footer & Hero mobile polish
   =========================== */

/* --- FOOTER --- */
@media (max-width: 600px) {
  /* Give a bit more breathing room on the edges */
  .site-footer .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  /* Center all footer columns and links on phones */
  .site-footer .footer-grid {
    text-align: center;
  }
  .site-footer .footer-grid a {
    display: inline-block;
  }
  /* Reduce spacing slightly so it doesn't feel too airy */
  .site-footer .footer-grid {
    gap: 16px !important;
  }
}

/* --- HERO (home page) --- */
/* Stack image under text on mobile and center the content */
@media (max-width: 900px) {
  /* Your hero uses inline grid; force stack */
  .hero .hero-inner {
    display: block !important;
    padding: 40px 0 !important;
  }
  /* Center the left/text column content */
  .hero .hero-inner > div:first-child {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
  }
  .hero .hero-inner h1 {
    font-size: 34px !important;   /* a touch smaller for phones */
    line-height: 1.15 !important;
  }
  .hero .hero-inner p {
    max-width: 28rem;
    margin: 0 auto;
  }
  /* Center the button row (the last div inside the text column) */
  .hero .hero-inner > div:first-child > div:last-child {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
  }
}

/* Very small phones: tighten title a bit more */
@media (max-width: 420px) {
  .hero .hero-inner h1 {
    font-size: 30px !important;
  }
}
/* Hero: add side spacing to the image and more gap from the buttons on mobile */
@media (max-width: 900px) {
  /* The hero image is the .card that follows the text block */
  .hero .hero-inner > .card {
    /* side spacing + extra gap from the button row above */
    margin: 24px 16px 0 16px !important; /* top | right | bottom | left */
    border-radius: 18px; /* keep your rounded look */
  }
}

/* If you want *just a touch* more on very small phones */
@media (max-width: 420px) {
  .hero .hero-inner > .card {
    margin: 26px 18px 0 18px !important;
  }
}
/* =========================================
   Cart: mobile-friendly stacked line items
   ========================================= */
@media (max-width: 780px) {
  /* Override earlier "scrollable tables" behavior for the CART only */
  #cartTable.table {
    display: block;           /* we’ll control row layout */
    overflow-x: visible;
    white-space: normal;
  }
  #cartTable thead { display: none; }  /* hide headings on phone */
  #cartTable tbody { display: block; }

  /* Each row becomes a card-like stack: Item, Price, Qty, Total, Remove */
  #cartTable tr {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "item"
      "price"
      "qty"
      "total"
      "remove";
    gap: 8px;
    padding: 12px;
    margin: 12px 0;
    border: 1px solid #e7ecff;
    border-radius: 12px;
    background: #fff;
  }

  #cartTable td {
    display: block;
    border: 0 !important;
    padding: 0 !important;
  }

  /* Item cell */
  #cartTable tr td:nth-child(1) { grid-area: item; }
  #cartTable tr td:nth-child(1) > div { gap: 10px; }
  #cartTable tr td:nth-child(1) img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; }
  /* Long names wrap cleanly */
  #cartTable tr td:nth-child(1) strong { display: block; overflow-wrap: anywhere; word-break: break-word; }

  /* Price cell */
  #cartTable tr td:nth-child(2) {
    grid-area: price;
    display: flex; align-items: center; justify-content: space-between;
  }
  #cartTable tr td:nth-child(2)::before {
    content: "Price";
    font-weight: 700; color: #0e1a40;
  }
  #cartTable .unit-price { text-align: right; }

  /* Qty cell */
  #cartTable tr td:nth-child(3) {
    grid-area: qty;
    display: flex; align-items: center; justify-content: space-between;
  }
  #cartTable tr td:nth-child(3)::before {
    content: "Qty";
    font-weight: 700; color: #0e1a40;
  }
  #cartTable .qty-input {
    width: 72px !important;
  }

  /* Total cell */
  #cartTable tr td:nth-child(4) {
    grid-area: total;
    display: flex; align-items: center; justify-content: space-between;
  }
  #cartTable tr td:nth-child(4)::before {
    content: "Total";
    font-weight: 700; color: #0e1a40;
  }
  #cartTable .line-total { text-align: right; }

  /* Remove button */
  #cartTable tr td:nth-child(5) {
    grid-area: remove;
    display: flex; justify-content: flex-end;
  }
  /* If you want full-width button on phones, uncomment:
  #cartTable tr td:nth-child(5) .btn { width: 100%; }
  */
}
/* ==========================
   Cart Drawer (slide-out)
   ========================== */
.cart-drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(14,26,64,.35);
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease;
  z-index: 10050;
}
.cart-drawer-overlay.show { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%;
  width: 380px; max-width: 92vw;
  background: #fff;
  box-shadow: -16px 0 40px rgba(15,30,60,.25);
  transform: translateX(100%);
  transition: transform .28s ease;
  z-index: 10060;
  display: flex; flex-direction: column;
  border-left: 1px solid #e7ecff;
  border-top-left-radius: 12px; border-bottom-left-radius: 12px;
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e7ecff;
  display: flex; align-items: center; justify-content: space-between;
}
.cart-drawer-header .close {
  background: transparent; border: 0; font-size: 22px; cursor: pointer;
  line-height: 1; color: #6c7693;
}

.cart-drawer-body { padding: 16px; overflow: auto; }
.cart-drawer-footer {
  padding: 16px; border-top: 1px solid #e7ecff;
  display: flex; gap: 10px;
}

.cart-drawer .added { display: flex; gap: 12px; align-items: center; }
.cart-drawer .added img {
  width: 56px; height: 56px; object-fit: contain;
  background: #f6f8ff; border: 1px solid #e7ecff; border-radius: 10px;
}
.cart-drawer .muted { color: #6c7693; font-size: 13px; }

@media (max-width: 480px){
  .cart-drawer { width: 100%; max-width: 100%; border-radius: 0; }
}
/* ==============================
   About page: mobile refinements
   ============================== */

/* Stack the content row on phones: show text first, image below */
@media (max-width: 900px) {
  .about-row {
    display: flex !important;          /* override inline grid */
    flex-direction: column;
    gap: 18px !important;
    padding: 18px !important;
  }
  /* The first child is the image card → place it after the text on mobile */
  .about-row > :first-child { order: 2; margin-top: 6px; }
  .about-row > :last-child  { order: 1; }

  /* Make the image breathe a bit on small screens */
  .about-row > :first-child img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
  }
}

/* Pillars: 2-up on small tablets, 1-up on phones */
@media (max-width: 900px) {
  .about-pillars {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
}
@media (max-width: 560px) {
  .about-pillars {
    grid-template-columns: 1fr !important;
  }
  .about-pillars .card {
    text-align: left;              /* reads nicer in a single column */
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    column-gap: 10px;
  }
  .about-pillars .card > div:first-child { /* the emoji */
    font-size: 24px;
    line-height: 1;
    text-align: center;
  }
}

/* Optional: tighten the intro spacing a touch on phones */
@media (max-width: 560px) {
  .section .container .card .pad .eyebrow { margin-bottom: 4px; }
  .section .container .card .pad h1 { margin-bottom: 6px; }
}
/* About pillars: center content on small phones */
@media (max-width: 560px) {
  .about-pillars .card {
    text-align: center !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .about-pillars .card > div:first-child {
    /* the emoji */
    font-size: 24px;
    line-height: 1;
    text-align: center;
  }
}
