/* =====================================================
   CALORA WEBSITE · style.css
   Shared look for every page: colours, font, top bar,
   header, footer, buttons, product cards and popups.
   ===================================================== */

:root {
  --black: #000;
  --white: #fff;
  --ink: #111;
  --turq: #0aaecb;
  --turq-dark: #0896af;
  --grey-btn: #8f9aa3;
  --grey-btn-dark: #7a858e;
  --line: #8c96a0;
  --line-soft: #c9cfd4;
  --red: #d8250f;
  --sku: #8f9aa3;
  --radius: 12px;
  --page: 1280px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Lora', Georgia, serif;
  color: var(--ink);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Black top bar ---------- */
.topbar {
  background: var(--black);
  color: var(--white);
  position: relative;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 56px;
}
.topbar .slogan {
  margin: 0;
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  text-align: center;
  line-height: 1.25;
}
.topbar .fb {
  position: absolute;
  right: 18%;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}
.topbar .fb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- White header ---------- */
.header {
  background: var(--white);
  border-bottom: 2px solid #9aa3ab;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 4px 24px;
  min-height: 72px;
}
.brand { display: block; width: 310px; }
.brand img { width: 100%; height: auto; }

.nav { display: flex; justify-content: center; align-items: center; gap: 44px; }
.nav > a, .nav .shop-link {
  text-decoration: none;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: .3px;
  white-space: nowrap;
}
.nav > a:hover, .nav .shop-link:hover { color: var(--turq-dark); }
.shop-wrap { position: relative; display: flex; align-items: center; }
.shop-toggle {
  background: none; border: 0; padding: 4px; cursor: pointer;
  display: flex; align-items: center;
}
.shop-toggle svg { width: 20px; height: 20px; transition: transform .2s; }
.shop-wrap.open .shop-toggle svg { transform: rotate(180deg); }
.shop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 250px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
  padding: 8px 0;
  list-style: none;
  margin: 0;
  display: none;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 60;
}
.shop-wrap.open .shop-menu { display: block; }
.shop-menu a {
  display: block;
  padding: 9px 18px;
  text-decoration: none;
  font-size: 18px;
}
.shop-menu a:hover { background: #eef9fc; color: var(--turq-dark); }
.shop-menu .all { font-weight: 700; border-bottom: 1px solid var(--line-soft); }

.tools { display: flex; align-items: center; gap: 18px; }
.tool-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  position: relative; display: block; text-decoration: none;
}
.tool-btn img { width: 50px; height: 50px; object-fit: contain; }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 13px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  line-height: 26px;
  text-align: center;
  border: 2px solid var(--white);
}
.cart-badge.zero { display: none; }
.menu-btn {
  display: none;
  background: none; border: 0; cursor: pointer; padding: 6px;
}
.menu-btn span {
  display: block; width: 26px; height: 3px; background: var(--ink);
  margin: 5px 0; border-radius: 2px;
}

/* Search bar (slides open under the header) */
.searchbar {
  border-top: 1px solid var(--line-soft);
  padding: 12px 24px;
  display: none;
}
.searchbar.open { display: block; }
.searchbar form { display: flex; gap: 10px; max-width: 720px; margin: 0 auto; }
.searchbar input {
  flex: 1; min-width: 0;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; font-size: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 3px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .3px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  color: var(--white);
  background: var(--turq);
  border: 1px solid rgba(0,0,0,.18);
  line-height: 1.2;
}
.btn:hover { background: var(--turq-dark); }
.btn.grey { background: var(--grey-btn); }
.btn.grey:hover { background: var(--grey-btn-dark); }
.btn.red { background: var(--red); }
.btn.big { font-size: 26px; padding: 10px 18px; }
.btn:disabled { opacity: .6; cursor: default; }

/* Big Checkout / Send Request button */
.btn-cart {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--turq);
  color: var(--ink);
  border: 1px solid rgba(0,0,0,.2);
  padding: 8px 18px 8px 10px;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.05;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.btn-cart:hover { background: var(--turq-dark); }
.btn-cart .icon {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btn-cart .icon img { width: 46px; height: 46px; object-fit: contain; }

/* ---------- Page headings & Back link ---------- */
.page-head { text-align: center; padding: 18px 20px 10px; position: relative; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 700; text-transform: uppercase; }
.page-head .sub { margin: 6px 0 0; font-size: 26px; font-weight: 600; }
.back {
  position: absolute; left: 40px; top: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-size: 26px; background: none; border: 0; cursor: pointer;
}
.back svg { width: 18px; height: 18px; }

/* ---------- Product card (shop grid) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding: 10px 22px 40px;
  max-width: var(--page);
  margin: 0 auto;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: hidden;
}
.card .photo {
  aspect-ratio: 1 / 1;
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  background: var(--white);
}
.card .photo img { width: 100%; height: 100%; object-fit: cover; }
.card .info { padding: 10px 14px 14px; text-align: center; display: flex; flex-direction: column; flex: 1; }
.card .name { font-weight: 600; font-size: 18px; margin: 0 0 6px; flex: 1; }
.card .price { font-weight: 700; font-size: 24px; margin: 0 0 12px; }
.card .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.card .actions .btn { font-size: 14px; padding: 8px 10px; white-space: nowrap; }

/* Placeholder picture when no photo uploaded yet */
.ph {
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 60% 22% at 30% 100%, #8aa600 98%, transparent 100%),
    radial-gradient(ellipse 80% 26% at 75% 104%, #c7df82 98%, transparent 100%),
    linear-gradient(#c8eafa, #effaff);
}

/* ---------- Popup (Add to Cart) ---------- */
.modal-back {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  padding: 26px 20px 20px;
}
.modal .close {
  position: absolute; top: 8px; right: 14px;
  background: none; border: 0; font-size: 34px; cursor: pointer; line-height: 1;
  font-family: Arial, sans-serif;
}

/* Qty control */
.qty { display: flex; align-items: stretch; gap: 10px; }
.qty input {
  width: 110px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  padding: 6px;
}
.qty .pm { display: flex; flex-direction: column; gap: 8px; }
.qty .pm button {
  width: 64px; flex: 1;
  background: var(--grey-btn);
  border: 0; border-radius: 4px;
  color: var(--ink);
  font-size: 30px; font-weight: 700; line-height: 1;
  cursor: pointer;
  font-family: Arial, sans-serif;
}
.qty .pm button:hover { background: var(--grey-btn-dark); }

/* Toast message */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--white);
  padding: 12px 22px; border-radius: 30px; font-size: 17px;
  z-index: 200; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  max-width: calc(100% - 32px); text-align: center;
}

.msg { text-align: center; padding: 30px 20px; font-size: 20px; }

/* ---------- Footer ---------- */
.footer { background: var(--black); color: var(--white); margin-top: 30px; }
.footer-inner {
  display: grid;
  grid-template-columns: 300px 200px 240px 1fr;
  gap: 20px;
  padding: 18px 40px 6px;
  max-width: var(--page);
  margin: 0 auto;
}
.footer-logo img { width: 200px; margin: 0 auto; }
.footer h3 { margin: 6px 0 14px; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 0 0 9px; }
.footer a { text-decoration: none; font-size: 16px; }
.footer a:hover { color: var(--turq); }
.footer p { margin: 0 0 14px; font-size: 16px; line-height: 1.05; }
.news-form { display: flex; gap: 10px; }
.news-form input {
  flex: 1; min-width: 0;
  border: 1px solid var(--line); border-radius: 4px;
  padding: 10px 12px; font-size: 16px;
  background: var(--white); color: var(--ink);
  height: 42px;
}
.news-form .btn { height: 42px; font-weight: 700; padding: 0 16px; }
.news-note { font-size: 14px; margin-top: 8px; min-height: 18px; color: #bfe9f2; }
.copyright { text-align: center; padding: 6px 20px 18px; font-size: 18px; }

/* =====================================================
   Smaller screens
   ===================================================== */
@media (max-width: 1180px) {
  .brand { width: 250px; }
  .nav { gap: 26px; }
  .nav > a, .nav .shop-link { font-size: 20px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 240px 170px 210px 1fr; padding: 18px 24px 6px; }
}

@media (max-width: 900px) {
  .topbar { padding: 6px 50px 6px 14px; }
  .topbar .slogan { font-size: 16px; }
  .topbar .fb { right: 12px; width: 26px; height: 26px; }

  .header-inner { grid-template-columns: 1fr auto; padding: 6px 14px; min-height: 60px; }
  .brand { width: 200px; grid-row: 1; grid-column: 1; }
  .tools { gap: 12px; grid-row: 1; grid-column: 2; }
  .tool-btn img { width: 40px; height: 40px; }
  .cart-badge { min-width: 22px; height: 22px; line-height: 22px; font-size: 13px; top: -6px; right: -8px; }
  .menu-btn { display: block; }

  .nav {
    grid-column: 1 / -1;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--line-soft);
    padding: 4px 0 8px;
  }
  .header.menu-open .nav { display: flex; }
  .nav > a, .shop-wrap { padding: 12px 6px; border-bottom: 1px solid #eef0f2; font-size: 20px; }
  .nav .shop-link { font-size: 20px; }
  .shop-wrap { flex-wrap: wrap; justify-content: space-between; }
  .shop-menu {
    position: static; box-shadow: none; border: 0; border-radius: 0;
    width: 100%; max-height: none; padding: 6px 0 0 10px;
  }
  .shop-menu a { padding: 8px 6px; font-size: 18px; }

  .back { position: static; font-size: 20px; margin-bottom: 6px; }
  .page-head { padding-top: 12px; }
  .page-head h1 { font-size: 24px; }
  .page-head .sub { font-size: 22px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 8px 12px 30px; }
  .card .name { font-size: 16px; }
  .card .price { font-size: 20px; }
  .card .actions { gap: 8px; }
  .card .actions .btn { font-size: 13px; padding: 7px 8px; flex: 1 1 100px; }

  .btn-cart { font-size: 22px; }
  .btn-cart .icon { width: 50px; height: 50px; }
  .btn-cart .icon img { width: 38px; height: 38px; }

  .footer-inner { grid-template-columns: 1fr 1fr; padding: 22px 18px 6px; gap: 22px 16px; }
  .footer-logo { grid-column: 1 / -1; }
  .footer-logo img { width: 170px; }
  .footer .news { grid-column: 1 / -1; }
  .copyright { font-size: 16px; }
}

@media (max-width: 420px) {
  .brand { width: 165px; }
  .tool-btn img { width: 36px; height: 36px; }
  .topbar .slogan { font-size: 14px; }
  .card .actions .btn { font-size: 12px; }
}
