/* =====================================================================
   IVANIAN BAKERY — Main stylesheet
   Palette: warm cream, chocolate brown, golden caramel, soft beige,
   white, with burgundy accents.
   ===================================================================== */

:root {
  --ivb-cream: #fff9f1;
  --ivb-cream-2: #fdf3e5;
  --ivb-beige: #f1e4d3;
  --ivb-brown: #3e2418;
  --ivb-brown-2: #5c3a24;
  --ivb-brown-3: #7a5236;
  --ivb-caramel: #c98b27;
  --ivb-caramel-2: #e0a83d;
  --ivb-burgundy: #7b2437;
  --ivb-white: #ffffff;
  --ivb-radius: 1rem;
  --ivb-shadow: 0 .5rem 1.5rem rgba(62, 36, 24, .08);
  --ivb-shadow-lg: 0 1rem 3rem rgba(62, 36, 24, .14);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', system-ui, -apple-system, sans-serif;
  color: var(--ivb-brown);
  background-color: var(--ivb-cream);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 1.02rem;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--ivb-brown);
}

a { color: var(--ivb-burgundy); text-decoration: none; }
a:hover { color: var(--ivb-caramel); }

.text-cream { color: var(--ivb-cream) !important; }
.text-cream-50 { color: rgba(255, 249, 241, .72) !important; }
.text-caramel { color: var(--ivb-caramel) !important; }
.text-burgundy { color: var(--ivb-burgundy) !important; }
.bg-cream { background-color: var(--ivb-cream) !important; }
.bg-cream-2 { background-color: var(--ivb-cream-2) !important; }
.bg-beige { background-color: var(--ivb-beige) !important; }
.bg-brown { background-color: var(--ivb-brown) !important; }

/* ---------- Buttons ---------- */
.btn { border-radius: 2rem; padding: .55rem 1.5rem; font-weight: 500; transition: all .25s ease; }
.btn-lg { padding: .8rem 2.2rem; }
.btn-caramel {
  background: linear-gradient(135deg, var(--ivb-caramel), var(--ivb-caramel-2));
  border: none; color: #fff;
  box-shadow: 0 .35rem 1rem rgba(201, 139, 39, .35);
}
.btn-caramel:hover, .btn-caramel:focus {
  background: linear-gradient(135deg, #b57a1e, var(--ivb-caramel));
  color: #fff; transform: translateY(-2px);
  box-shadow: 0 .6rem 1.4rem rgba(201, 139, 39, .45);
}
.btn-brown { background: var(--ivb-brown); border: none; color: var(--ivb-cream); }
.btn-brown:hover { background: var(--ivb-brown-2); color: #fff; transform: translateY(-2px); }
.btn-outline-brown { border: 2px solid var(--ivb-brown); color: var(--ivb-brown); background: transparent; }
.btn-outline-brown:hover { background: var(--ivb-brown); color: var(--ivb-cream); }
.btn-burgundy { background: var(--ivb-burgundy); border: none; color: #fff; }
.btn-burgundy:hover { background: #641d2d; color: #fff; transform: translateY(-2px); }

/* ---------- Announcement bar ---------- */
.announcement-bar {
  background: var(--ivb-brown);
  color: var(--ivb-cream);
  letter-spacing: .02em;
}

/* ---------- Header / navbar ---------- */
.site-header { background: var(--ivb-white); }
.site-header .navbar { padding-top: .8rem; padding-bottom: .8rem; }
.brand-logo { display: inline-flex; align-items: baseline; gap: .4rem; text-decoration: none; }
.site-logo {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  align-self: center; box-shadow: 0 2px 8px rgba(62, 36, 24, .25);
  border: 2px solid rgba(201, 139, 39, .55);
}
.site-logo-lg { width: 42px; height: 42px; }
.brand-main {
  font-family: 'Playfair Display', serif; font-weight: 800; font-size: 1.55rem;
  color: var(--ivb-brown); letter-spacing: .04em;
}
.brand-sub {
  font-family: 'Jost', sans-serif; font-weight: 500; font-size: .85rem;
  color: var(--ivb-caramel); letter-spacing: .45em; text-transform: uppercase;
}
.navbar .nav-link { color: var(--ivb-brown); font-weight: 500; padding-inline: 1rem; position: relative; }
.navbar .nav-link::after {
  content: ""; position: absolute; left: 1rem; right: 1rem; bottom: .2rem; height: 2px;
  background: var(--ivb-caramel); transform: scaleX(0); transition: transform .25s ease; transform-origin: left;
}
.navbar .nav-link:hover::after, .navbar .nav-link.active::after { transform: scaleX(1); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: var(--ivb-cream-2); color: var(--ivb-brown); font-size: 1.05rem;
  transition: all .2s ease; text-decoration: none;
}
.icon-btn:hover { background: var(--ivb-caramel); color: #fff; }
.cart-badge {
  position: absolute; top: -4px; right: -6px;
  background: var(--ivb-burgundy); color: #fff; font-size: .68rem; min-width: 1.3rem;
}
.nav-search { min-width: 240px; }
.nav-search-input { border-radius: 2rem; padding-right: 2.8rem; border-color: var(--ivb-beige); background: var(--ivb-cream-2); }
.nav-search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--ivb-caramel); padding: .3rem .6rem;
}
.live-search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1050;
  background: #fff; border-radius: .75rem; overflow: hidden; max-height: 380px; overflow-y: auto;
}
.live-search-results a {
  display: flex; gap: .75rem; align-items: center; padding: .6rem .9rem; color: var(--ivb-brown);
  border-bottom: 1px solid var(--ivb-cream-2);
}
.live-search-results a:hover { background: var(--ivb-cream-2); }
.live-search-results img { width: 44px; height: 44px; object-fit: cover; border-radius: .5rem; }
.mobile-nav-list li a {
  display: block; padding: .65rem .25rem; color: var(--ivb-brown); font-weight: 500;
  border-bottom: 1px solid var(--ivb-cream-2);
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(224, 168, 61, .25), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(123, 36, 55, .12), transparent 55%),
    linear-gradient(135deg, var(--ivb-cream-2) 0%, var(--ivb-cream) 100%);
  padding: 4.5rem 0;
  position: relative; overflow: hidden;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.15; font-weight: 800; }
.hero .lead { color: var(--ivb-brown-3); max-width: 34rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(201, 139, 39, .14); color: var(--ivb-brown-2);
  border-radius: 2rem; padding: .4rem 1.1rem; font-size: .9rem; font-weight: 500;
}
.hero-visual {
  border-radius: 2rem; box-shadow: var(--ivb-shadow-lg); width: 100%;
  aspect-ratio: 5 / 4; object-fit: cover; background: var(--ivb-beige);
}
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-stats .stat b { font-size: 1.4rem; font-family: 'Playfair Display', serif; display: block; color: var(--ivb-burgundy); }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-title { position: relative; margin-bottom: .4rem; font-weight: 700; }
.section-sub { color: var(--ivb-brown-3); margin-bottom: 2.2rem; }
.section-eyebrow {
  text-transform: uppercase; letter-spacing: .3em; font-size: .78rem;
  color: var(--ivb-caramel); font-weight: 600; margin-bottom: .4rem; display: block;
}

/* ---------- Cards ---------- */
.card { border: none; border-radius: var(--ivb-radius); }
.product-card {
  border-radius: var(--ivb-radius); overflow: hidden; background: #fff;
  box-shadow: var(--ivb-shadow); transition: transform .3s ease, box-shadow .3s ease;
  height: 100%; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--ivb-shadow-lg); }
.product-card .card-img-wrap { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: var(--ivb-cream-2); }
.product-card .card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .card-img-wrap img { transform: scale(1.06); }
.product-card .badges { position: absolute; top: .8rem; left: .8rem; display: flex; flex-direction: column; gap: .35rem; z-index: 2; }
.badge-sale { background: var(--ivb-burgundy); }
.badge-featured { background: var(--ivb-caramel); }
.badge-out { background: #6c757d; }
.product-card .wish-btn {
  position: absolute; top: .8rem; right: .8rem; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .92); color: var(--ivb-burgundy);
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(-6px); transition: all .25s ease;
}
.product-card:hover .wish-btn, .product-card .wish-btn.active { opacity: 1; transform: translateY(0); }
.product-card .wish-btn:hover, .product-card .wish-btn.active { background: var(--ivb-burgundy); color: #fff; }
.product-card .card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex-grow: 1; }
.product-card .product-cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ivb-caramel); }
.product-card .product-name a { color: var(--ivb-brown); font-family: 'Playfair Display', serif; font-weight: 600; font-size: 1.08rem; }
.product-card .product-name a:hover { color: var(--ivb-caramel); }
.product-card .price { font-weight: 600; font-size: 1.1rem; color: var(--ivb-burgundy); }
.product-card .price .old { color: #9b8a7d; text-decoration: line-through; font-weight: 400; font-size: .92rem; margin-left: .45rem; }
.product-card .card-actions { margin-top: auto; padding-top: .6rem; }

/* ---------- Category cards ---------- */
.category-card {
  display: block; border-radius: var(--ivb-radius); overflow: hidden; position: relative;
  box-shadow: var(--ivb-shadow); aspect-ratio: 4 / 3; background: var(--ivb-beige);
  transition: transform .3s ease, box-shadow .3s ease;
}
.category-card:hover { transform: translateY(-5px); box-shadow: var(--ivb-shadow-lg); }
.category-card img { width: 100%; height: 100%; object-fit: cover; }
.category-card .overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  background: linear-gradient(to top, rgba(62, 36, 24, .82), transparent 55%);
  padding: 1.1rem;
}
.category-card .overlay h3 { color: var(--ivb-cream); font-size: 1.15rem; margin: 0; }

/* ---------- Feature tiles ---------- */
.feature-tile {
  background: #fff; border-radius: var(--ivb-radius); padding: 2rem 1.6rem; height: 100%;
  box-shadow: var(--ivb-shadow); text-align: center; transition: transform .3s ease;
}
.feature-tile:hover { transform: translateY(-5px); }
.feature-tile .icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
  background: linear-gradient(135deg, rgba(201,139,39,.16), rgba(123,36,55,.12));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--ivb-caramel);
}

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: #fff; border-radius: var(--ivb-radius); padding: 1.8rem; height: 100%;
  box-shadow: var(--ivb-shadow); position: relative;
}
.testimonial-card::before {
  content: "\201C"; position: absolute; top: .4rem; right: 1.2rem;
  font-family: 'Playfair Display', serif; font-size: 4rem; color: var(--ivb-beige); line-height: 1;
}

/* ---------- Gallery ---------- */
.gallery-tile { border-radius: .8rem; overflow: hidden; aspect-ratio: 1/1; display: block; position: relative; background: var(--ivb-beige); }
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-tile:hover img { transform: scale(1.08); }
.gallery-tile .hover-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(123, 36, 55, .45); color: #fff; font-size: 1.5rem;
  opacity: 0; transition: opacity .3s ease;
}
.gallery-tile:hover .hover-icon { opacity: 1; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(800px 300px at 15% -20%, rgba(224,168,61,.35), transparent 60%),
    linear-gradient(120deg, var(--ivb-brown) 0%, #55321d 100%);
  border-radius: 1.5rem; color: var(--ivb-cream); padding: 3.2rem;
}
.cta-band h2 { color: var(--ivb-cream); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ivb-brown); color: rgba(255, 249, 241, .85); }
.footer-newsletter { background: #33200f; }
.footer-heading {
  color: var(--ivb-caramel-2); text-transform: uppercase; letter-spacing: .18em;
  font-size: .8rem; margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a, .footer-contact a { color: rgba(255, 249, 241, .78); }
.footer-links a:hover, .footer-contact a:hover { color: var(--ivb-caramel-2); }
.footer-contact li { margin-bottom: .6rem; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .08); color: var(--ivb-cream); transition: all .2s ease;
}
.footer-social a:hover { background: var(--ivb-caramel); color: #fff; transform: translateY(-3px); }
.footer-bottom { background: #2c1a0d; color: rgba(255, 249, 241, .6); }
.footer-bottom a { color: rgba(255, 249, 241, .6); }
.footer-bottom a:hover { color: var(--ivb-caramel-2); }

/* ---------- Floating buttons ---------- */
.back-to-top {
  position: fixed; bottom: 90px; right: 22px; z-index: 1040;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--ivb-brown); color: var(--ivb-cream);
  box-shadow: var(--ivb-shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .3s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--ivb-caramel); }
.whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 1040;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25d366; color: #fff; font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 .5rem 1.5rem rgba(37, 211, 102, .4); transition: transform .25s ease;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: .7rem; border-color: var(--ivb-beige);
  padding: .6rem .9rem; background-color: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ivb-caramel); box-shadow: 0 0 0 .2rem rgba(201, 139, 39, .18);
}
label.form-label { font-weight: 500; color: var(--ivb-brown-2); }
.auth-card { max-width: 460px; margin: 0 auto; border-radius: 1.2rem; box-shadow: var(--ivb-shadow-lg); background: #fff; }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { --bs-breadcrumb-divider: '›'; margin-bottom: 0; }
.breadcrumb a { color: var(--ivb-brown-3); }
.page-hero { background: var(--ivb-cream-2); padding: 2.4rem 0; border-bottom: 1px solid var(--ivb-beige); }

/* ---------- Shop filters ---------- */
.filter-card { background: #fff; border-radius: var(--ivb-radius); box-shadow: var(--ivb-shadow); padding: 1.4rem; }
.filter-card h6 {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  color: var(--ivb-caramel); margin-bottom: .8rem;
}

/* ---------- Product page ---------- */
.product-main-img {
  border-radius: var(--ivb-radius); width: 100%; aspect-ratio: 1/1; object-fit: cover;
  box-shadow: var(--ivb-shadow); background: var(--ivb-cream-2); cursor: zoom-in;
}
.product-thumbs { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.product-thumbs img {
  width: 70px; height: 70px; object-fit: cover; border-radius: .6rem; cursor: pointer;
  border: 2px solid transparent; transition: border-color .2s ease;
}
.product-thumbs img.active, .product-thumbs img:hover { border-color: var(--ivb-caramel); }
.price-display { font-size: 1.9rem; font-weight: 700; color: var(--ivb-burgundy); font-family: 'Playfair Display', serif; }
.price-display .old { font-size: 1.1rem; color: #9b8a7d; text-decoration: line-through; font-weight: 400; margin-left: .6rem; }
.qty-group { display: inline-flex; align-items: center; border: 2px solid var(--ivb-beige); border-radius: 2rem; overflow: hidden; }
.qty-group button { border: none; background: transparent; width: 42px; height: 42px; color: var(--ivb-brown); font-size: 1rem; }
.qty-group button:hover { background: var(--ivb-cream-2); }
.qty-group input { width: 52px; border: none; text-align: center; font-weight: 600; background: transparent; }
.qty-group input:focus { outline: none; }
.info-strip { background: var(--ivb-cream-2); border-radius: .8rem; padding: .8rem 1rem; font-size: .92rem; }

/* Zoom modal image */
.img-zoom-modal img { width: 100%; border-radius: .8rem; }

/* ---------- Cart / checkout ---------- */
.cart-table img { width: 74px; height: 74px; object-fit: cover; border-radius: .7rem; }
.summary-card { background: #fff; border-radius: var(--ivb-radius); box-shadow: var(--ivb-shadow); padding: 1.6rem; }
.summary-card .row-line { display: flex; justify-content: space-between; padding: .45rem 0; }
.summary-card .grand { border-top: 2px dashed var(--ivb-beige); margin-top: .5rem; padding-top: .8rem; font-size: 1.2rem; font-weight: 700; color: var(--ivb-burgundy); }
.checkout-step-title {
  display: flex; align-items: center; gap: .8rem; font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 700; margin-bottom: 1.2rem;
}
.checkout-step-title .num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--ivb-caramel); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-family: 'Jost', sans-serif; font-size: 1rem;
}
.payment-option { border: 2px solid var(--ivb-beige); border-radius: .9rem; padding: 1rem 1.2rem; cursor: pointer; transition: all .2s ease; display: block; }
.payment-option:hover { border-color: var(--ivb-caramel-2); }
.payment-option.selected, .payment-option:has(input:checked) { border-color: var(--ivb-caramel); background: rgba(201, 139, 39, .06); }

/* ---------- Order tracking timeline ---------- */
.track-timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.track-timeline::before {
  content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 3px;
  background: var(--ivb-beige); border-radius: 2px;
}
.track-timeline li { position: relative; padding: 0 0 1.6rem 58px; }
.track-timeline .dot {
  position: absolute; left: 4px; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 3px solid var(--ivb-beige);
  display: flex; align-items: center; justify-content: center;
  color: #b6a695; font-size: .85rem; z-index: 1;
}
.track-timeline li.done .dot { background: var(--ivb-caramel); border-color: var(--ivb-caramel); color: #fff; }
.track-timeline li.current .dot { background: var(--ivb-burgundy); border-color: var(--ivb-burgundy); color: #fff; box-shadow: 0 0 0 6px rgba(123, 36, 55, .15); }
.track-timeline li.done .label, .track-timeline li.current .label { color: var(--ivb-brown); font-weight: 600; }
.track-timeline .label { color: #a5917f; }

/* ---------- Customer dashboard ---------- */
.dash-nav .list-group-item { border: none; border-radius: .7rem !important; margin-bottom: .3rem; color: var(--ivb-brown); font-weight: 500; }
.dash-nav .list-group-item.active { background: var(--ivb-brown); color: var(--ivb-cream); }
.dash-nav .list-group-item:hover:not(.active) { background: var(--ivb-cream-2); }
.stat-card { background: #fff; border-radius: var(--ivb-radius); box-shadow: var(--ivb-shadow); padding: 1.4rem; display: flex; align-items: center; gap: 1rem; }
.stat-card .icon {
  width: 52px; height: 52px; border-radius: .9rem; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201, 139, 39, .14); color: var(--ivb-caramel);
}
.stat-card b { font-size: 1.35rem; font-family: 'Playfair Display', serif; display: block; }

/* ---------- Misc ---------- */
.rounded-xl { border-radius: var(--ivb-radius) !important; }
.shadow-soft { box-shadow: var(--ivb-shadow) !important; }
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--ivb-brown-3); }
.empty-state i { font-size: 3.2rem; color: var(--ivb-beige); margin-bottom: 1rem; }
.table { --bs-table-hover-bg: var(--ivb-cream-2); }
.pagination .page-link { color: var(--ivb-brown); border-color: var(--ivb-beige); border-radius: .6rem; margin: 0 .15rem; }
.pagination .page-item.active .page-link { background: var(--ivb-caramel); border-color: var(--ivb-caramel); }
.sticky-mobile-cart {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030;
  background: #fff; box-shadow: 0 -0.4rem 1.5rem rgba(62,36,24,.15); padding: .8rem 1rem;
}
@media (min-width: 768px) { .sticky-mobile-cart { display: none; } }

.review-img { max-width: 110px; border-radius: .6rem; }

/* Fade-in on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 575.98px) {
  .section { padding: 2.6rem 0; }
  .hero { padding: 2.8rem 0; }
  .cta-band { padding: 2rem 1.4rem; }
}
