/* ==========================================================================
   OmniStore - Modern E-Commerce UI Stylesheet
   Clean, mobile-first, conversion-optimized design
   ========================================================================== */

:root {
  --primary: #0d6efd;
  --primary-hover: #0b5ed7;
  --primary-soft: #e7f1ff;
  --secondary: #6c757d;
  --dark: #1e293b;
  --light: #f8fafc;
  --border-color: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

body {
  font-family: var(--font-main);
  color: #334155;
  background-color: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

/* ---------------- Top bar & Navigation ---------------- */
.top-bar {
  background-color: #0f172a;
  color: #94a3b8;
  font-size: 0.825rem;
  padding: 6px 0;
}
.top-bar a {
  color: #cbd5e1;
}
.top-bar a:hover {
  color: #ffffff;
}

.main-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.navbar-brand-logo {
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.5px;
  color: #0f172a;
}
.navbar-brand-logo span {
  color: var(--primary);
}

.search-bar-wrap {
  position: relative;
  max-width: 540px;
  width: 100%;
}
.search-input {
  border-radius: 50px;
  padding: 10px 48px 10px 20px;
  border: 1.5px solid var(--border-color);
  font-size: 0.925rem;
  transition: all 0.2s ease;
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}
.search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #334155;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.nav-icon-link:hover {
  background: #f1f5f9;
  color: var(--primary);
}
.nav-icon-badge {
  position: absolute;
  top: 2px;
  left: 24px;
  background-color: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

/* Category Subnav */
.category-subnav {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  overflow-x: auto;
  white-space: nowrap;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 50px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-right: 6px;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ---------------- Hero Section ---------------- */
.hero-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  position: relative;
  overflow: hidden;
}
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}

/* ---------------- Product Cards ---------------- */
.product-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.product-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect ratio */
  background: #f8fafc;
  overflow: hidden;
}
.product-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.3s ease;
}
.product-card:hover .product-img-wrap img {
  transform: scale(1.04);
}

.badge-discount-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ef4444;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
}

.badge-stock {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  z-index: 2;
}

.product-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.product-category-name {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}
.product-title:hover {
  color: var(--primary);
}

.price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 14px;
}
.price-current {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}
.price-original {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.btn-add-cart {
  width: 100%;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

/* ---------------- Product Detail Page ---------------- */
.product-gallery-main {
  width: 100%;
  height: 440px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}
.product-gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.thumbnail-strip {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.thumbnail-item {
  width: 70px;
  height: 70px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  padding: 4px;
  overflow: hidden;
}
.thumbnail-item.active {
  border-color: var(--primary);
}
.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Variant Radio Pills */
.variant-btn-group .btn-check:checked + .btn-outline-primary {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ---------------- Cart & Checkout ---------------- */
.cart-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
  border-top: none;
}
.cart-summary-box {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

/* ---------------- Toast Notification ---------------- */
.omni-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: white;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 1090;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.omni-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------------- Footer ---------------- */
footer {
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 60px 0 20px;
  margin-top: 60px;
}
footer h6 {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 18px;
}
footer a {
  color: #94a3b8;
}
footer a:hover {
  color: #ffffff;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  margin-top: 40px;
  font-size: 0.825rem;
}
