/* =========================================================
   URBANZA — Premium Storefront Stylesheet
   Matches the actual Bootstrap-based PHP templates in use.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --urbanza-primary: #14141c;
  --urbanza-primary-soft: #1e1e29;
  --urbanza-accent: #b8935a;
  --urbanza-accent-light: #d7b989;
  --urbanza-cream: #f7f6f3;
  --urbanza-muted: #7a7a7a;
  --urbanza-border: #e8e5df;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1b1b1b;
  background: #fff;
  line-height: 1.65;
}

h1, h2, h3, .fw-bold {
  font-family: 'Playfair Display', 'Inter', serif;
}

a { transition: color .15s ease; }

/* ---------- Navbar ---------- */
.urbanza-navbar {
  background: var(--urbanza-primary);
  box-shadow: 0 2px 18px rgba(0,0,0,.08);
}
.urbanza-navbar .navbar-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 1.4rem;
  color: #f7f6f3 !important;
}
.urbanza-navbar .nav-link {
  color: #d8d6d0 !important;
  font-weight: 500;
  font-size: .92rem;
  letter-spacing: .01em;
}
.urbanza-navbar .nav-link:hover,
.urbanza-navbar .nav-link:focus {
  color: var(--urbanza-accent-light) !important;
}
.urbanza-navbar .navbar-toggler { border-color: rgba(255,255,255,.25); }
.urbanza-navbar .navbar-toggler-icon { filter: invert(1); }
.cart-badge {
  position: absolute; top: -4px; right: -12px;
  font-size: .62rem; background: var(--urbanza-accent) !important;
}
.btn-urbanza-outline {
  border: 1px solid rgba(247,246,243,.45);
  color: #f7f6f3 !important;
  border-radius: 3px;
  font-size: .85rem;
  padding: 6px 16px;
}
.btn-urbanza-outline:hover {
  background: var(--urbanza-accent);
  border-color: var(--urbanza-accent);
  color: #14141c !important;
}

/* ---------- Buttons ---------- */
.btn-urbanza {
  background: var(--urbanza-primary);
  border: 1px solid var(--urbanza-primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 3px;
  padding: 10px 22px;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn-urbanza:hover {
  background: var(--urbanza-accent);
  border-color: var(--urbanza-accent);
  color: #14141c;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
}
.btn-outline-dark {
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .15s ease;
}
.btn-outline-dark:hover { transform: translateY(-2px); }
.btn.btn-secondary { border-radius: 3px; }

/* ---------- Hero ---------- */
.hero-section {
  background: linear-gradient(120deg, var(--urbanza-primary) 0%, var(--urbanza-primary-soft) 100%);
  color: #fff;
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}
.hero-section:before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(184,147,90,.18), transparent 55%);
}
.hero-section h1 {
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  position: relative;
  letter-spacing: -.01em;
}
.hero-section .lead {
  color: #cfcdc7;
  max-width: 560px;
  margin-left: auto; margin-right: auto;
  position: relative;
}

/* ---------- Category tiles ---------- */
.border.rounded-3.text-center.p-3 {
  border: 1px solid var(--urbanza-border) !important;
  border-radius: 20px !important;
  transition: all .2s ease;
  background: #fff;
}
.border.rounded-3.text-center.p-3:hover {
  border-color: var(--urbanza-accent) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}
.border.rounded-3.text-center.p-3 i { color: var(--urbanza-accent) !important; }

.category-tile:hover img { transform: scale(1.08); }

/* ---------- Hero slideshow (reuses .carousel-track mechanics, 1 slide per view) ---------- */
.hero-slideshow-wrap { position: relative; }
.hero-carousel.carousel-track {
  gap: 0;
  scroll-snap-type: x mandatory;
}
.hero-carousel .urb-carousel-item.hero-slide-item {
  width: 100%;
  scroll-snap-align: start;
}
.hero-slide {
  display: flex;
  align-items: center;
  min-height: 460px;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-decoration: none;
}
.hero-slide-caption {
  padding: 0 8%;
  max-width: 640px;
}
.hero-slide-caption h1 {
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #fff;
  margin-bottom: 12px;
}
.hero-slide-caption p { color: #f0f0f0; margin: 0; }
.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  padding: 0;
  transition: background .15s ease, transform .15s ease;
}
.hero-dot.active { background: #fff; transform: scale(1.3); }
@media (max-width: 576px) {
  .hero-slide { min-height: 340px; }
}

/* ---------- Draggable / swipeable product carousel ----------
   Touch devices: handled entirely natively by overflow-x + scroll-snap
   (momentum + snapping is free, and never fights vertical page scroll).
   Mouse: dragged via JS (see script.js) by directly setting scrollLeft. */
.carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scrollbar-width: thin;
}
.carousel-track.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--urbanza-border); border-radius: 3px; }
.carousel-track::-webkit-scrollbar-track { background: transparent; }

.urb-carousel-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: calc(50% - 12px);
}
@media (min-width: 768px) {
  .urb-carousel-item { width: calc(33.333% - 16px); }
}
@media (min-width: 992px) {
  .urb-carousel-item { width: calc(25% - 18px); }
}

/* ---------- Discount badge (top-left of product image) ---------- */
.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: #dc3545;
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
  padding: 4px 9px;
  border-radius: 4px;
  letter-spacing: .01em;
}

/* ---------- Price bar (regular price struck-through + bold sale price, right-aligned) ---------- */
.price-bar {
  background: var(--urbanza-accent, #b8935a);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: right;
  display: block;
}
.price-bar .regular-price {
  display: block;
  text-decoration: line-through;
  opacity: .75;
  font-size: .78rem;
  font-weight: 400;
}
.price-bar .sale-price {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
}

/* ---------- Product cards ---------- */
.product-card {
  border: 1px solid var(--urbanza-border) !important;
  border-radius: 10px !important;
  overflow: hidden;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px rgba(0,0,0,.09);
}
.product-card img { transition: transform .4s ease; }
.product-card:hover img { transform: scale(1.05); }
.product-price {
  font-weight: 700;
  color: var(--urbanza-primary);
  font-size: 1.1rem;
}
.stock-badge-in { color: #1a7a4c; font-weight: 500; }
.stock-badge-low { color: #b8791f; font-weight: 500; }
.stock-badge-out { color: #b83a3a; font-weight: 500; }

/* ---------- Forms / auth ---------- */
.auth-card {
  max-width: 440px;
  margin: 60px auto;
  border-radius: 14px;
  border: 1px solid var(--urbanza-border);
  box-shadow: 0 20px 45px rgba(0,0,0,.06);
}
.auth-card h3 { font-family: 'Playfair Display', serif; }
.form-control, .form-select {
  border-radius: 5px;
  border-color: #d9d6cf;
  padding: 10px 12px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--urbanza-accent);
  box-shadow: 0 0 0 3px rgba(184,147,90,.12);
}

/* ---------- Footer ---------- */
.urbanza-footer { background: var(--urbanza-primary); color: #d8d6d0; }
.urbanza-footer h5, .urbanza-footer h6 { font-family: 'Playfair Display', serif; color: #ffffff !important; }
.urbanza-footer p,
.urbanza-footer li,
.urbanza-footer small,
.urbanza-footer .text-muted {
  color: #d8d6d0 !important;
}
.footer-link { color: #d8d6d0 !important; text-decoration: none; }
.footer-link:hover { color: var(--urbanza-accent-light) !important; }
.urbanza-footer hr { border-color: rgba(255,255,255,.15); }

/* ---------- WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1050;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  transition: transform .15s ease;
}
.whatsapp-float:hover {
  color: #fff;
  transform: scale(1.08);
}
.whatsapp-footer-link { color: #d8d6d0 !important; }
.whatsapp-footer-link:hover { color: #25D366 !important; }
@media (max-width: 576px) {
  .whatsapp-float { right: 14px; bottom: 14px; width: 50px; height: 50px; font-size: 1.4rem; }
}

/* ---------- Cards / tables (generic content) ---------- */
.card { border-radius: 10px; border-color: var(--urbanza-border); }
.badge { font-weight: 600; letter-spacing: .01em; border-radius: 4px; padding: 5px 9px; }

/* ---------- Admin sidebar ---------- */
.admin-sidebar {
  background: var(--urbanza-primary);
  min-height: 100vh;
  color: #fff;
}
.admin-sidebar h5 { font-family: 'Playfair Display', serif; letter-spacing: .05em; }
.admin-sidebar .nav { gap: 2px; }
.admin-sidebar a {
  color: #cfcdc7;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border-radius: 6px;
  font-size: .93rem;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.admin-sidebar a:hover {
  background: rgba(184,147,90,.14);
  color: #fff;
}
.admin-sidebar a.active {
  background: var(--urbanza-accent);
  color: #14141c;
  font-weight: 600;
}
.admin-sidebar hr { opacity: .15; }

/* ---------- Admin dashboard stat cards ---------- */
.stat-card {
  border-radius: 12px;
  border: 1px solid var(--urbanza-border);
  padding: 22px;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0,0,0,.06);
}

/* ---------- Flash messages ---------- */
.flash-alert { z-index: 1055; font-weight: 500; }

/* ---------- Star rating input (click-to-rate) ---------- */
.star-rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}
.star-rating-input input { display: none; }
.star-rating-input label {
  font-size: 1.7rem;
  color: #ddd;
  cursor: pointer;
  transition: color .15s ease;
}
.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
  color: var(--urbanza-accent);
}

/* ---------- Contact button ---------- */
.contact-btn {
  color: #d8d6d0 !important;
}
.contact-btn:hover { color: var(--urbanza-accent-light) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero-section { padding: 55px 0; }
  .hero-section h1 { font-size: 2rem; }
  .admin-sidebar { min-height: auto; }
}
@media (max-width: 576px) {
  .product-card img { height: auto; }
  .auth-card { margin: 30px auto; padding: 24px !important; }
}