/* ═══════════════════════════════════════════════════════════════
   minmart - Main Stylesheet
   Amazon-inspired ecommerce design with modern UI  
═══════════════════════════════════════════════════════════════ */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --primary: #f90;
  --primary-dark: #e77600;
  --accent: #131921;
  --accent2: #232f3e;
  --blue: #007185;
  --blue-hover: #005a6a;
  --green: #067d62;
  --red: #cc0c39;
  --text: #0f1111;
  --text-muted: #565959;
  --border: #d5d9d9;
  --bg: #eaeded;
  --white: #ffffff;
  --card-radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, .12);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, .18);
  --transition: all .2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* ─── Container ─────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ─── Top Bar ───────────────────────────────────────────────── */
.topbar {
  background: var(--accent);
  color: #ccc;
  font-size: 12px;
  padding: 4px 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ─── Header ────────────────────────────────────────────────── */
.header {
  background: var(--accent2);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo */
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-size: 28px;
  font-weight: 800;
  color: var(--logo-color);
  letter-spacing: -1px;
}

.logo-text::after {
  content: '.in';
  font-size: 14px;
  color: #ccc;
  font-weight: 400;
}

/* Search */
.search-form {
  flex: 1;
  display: flex;
  max-width: 700px;
}

.search-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 15px;
  border: none;
  border-radius: 6px 0 0 6px;
  background: #fff;
  color: var(--text);
}

.search-btn {
  background: var(--primary);
  color: var(--accent);
  border: none;
  padding: 10px 18px;
  font-size: 18px;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--primary-dark);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: #fff;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .1);
  outline: 1px solid #999;
}

.cart-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  transition: var(--transition);
  position: relative;
}

.cart-btn:hover {
  outline: 1px solid #999;
  background: rgba(255, 255, 255, .1);
}

.cart-badge {
  background: var(--primary);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 180px;
  box-shadow: var(--shadow-hover);
  z-index: 500;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
  transition: var(--transition);
}

.dropdown-menu a:hover {
  background: #f7f8f8;
  color: var(--blue);
}

.dropdown-menu hr {
  margin: 4px 0;
  border: none;
  border-top: 1px solid var(--border);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
}

/* ─── Category Nav ───────────────────────────────────────────── */
.cat-nav {
  background: var(--accent);
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  overflow-x: auto;
}

.cat-nav .container {
  display: flex;
  gap: 0;
  align-items: stretch;
  white-space: nowrap;
}

.cat-nav-link {
  color: #ddd;
  font-size: 13px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.cat-nav-link:hover,
.cat-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .1);
  outline: 1px solid rgba(255, 255, 255, .3);
}

/* ─── Flash Messages ─────────────────────────────────────────── */
.flash-container {
  min-height: 0;
}

.flash {
  padding: 12px 20px;
  font-weight: 500;
  font-size: 14px;
  text-align: center;
}

.flash-success {
  background: #d1fae5;
  color: #065f46;
  border-bottom: 2px solid #6ee7b7;
}

.flash-error {
  background: #fee2e2;
  color: #991b1b;
  border-bottom: 2px solid #fca5a5;
}

.flash-info {
  background: #dbeafe;
  color: #1e40af;
  border-bottom: 2px solid #93c5fd;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(180deg, #f7ca45, #f0ac00);
  color: var(--accent);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #f5c518, #e8a300);
  box-shadow: 0 2px 8px rgba(240, 172, 0, .4);
}

.btn-secondary {
  background: linear-gradient(180deg, #fff, #e8e8e8);
  color: var(--accent);
  border: 1px solid #ccc;
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #f5f5f5, #ddd);
}

.btn-blue {
  background: linear-gradient(180deg, #43b4d3, #007185);
  color: #fff;
}

.btn-blue:hover {
  background: linear-gradient(180deg, #2da6c7, #005a6a);
}

.btn-green {
  background: linear-gradient(180deg, #0d9e71, #067d62);
  color: #fff;
}

.btn-green:hover {
  background: linear-gradient(180deg, #0b8a62, #056655);
}

.btn-red {
  background: linear-gradient(180deg, #e55, #c33);
  color: #fff;
}

.btn-red:hover {
  background: linear-gradient(180deg, #d33, #b11);
}

.btn-wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
}

.btn-wa:hover {
  background: linear-gradient(135deg, #1ebe5b, #0e7a6d);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ─── Banner Slider ──────────────────────────────────────────── */
.banner-section {
  background: var(--white);
}

.banner-slider {
  position: relative;
  overflow: hidden;
  background: #131921;
}

.banner-slide {
  display: none;
  position: relative;
  color: #fff;
  width: 100%;
}

.banner-slide.active {
  display: block;
}

.banner-content {
  position: absolute;
  inset: 0;
  padding: 40px 60px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.banner-content * {
  pointer-events: auto;
}

.banner-content h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .6);
}

.banner-content p {
  font-size: 16px;
  color: #e2e8f0;
  margin-bottom: 24px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}

.banner-image {
  width: 100%;
  height: auto;
  min-height: 280px;
  max-height: 550px;
  object-fit: fill;
  display: block;
  opacity: 0.5;
  z-index: 1;
}

.banner-fallback {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 60px;
  background: linear-gradient(135deg, #131921, #232f3e);
}

.banner-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.banner-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

.banner-prev,
.banner-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, .4);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  z-index: 3;
  transition: var(--transition);
  pointer-events: auto;
}

.banner-prev:hover,
.banner-next:hover {
  background: rgba(0, 0, 0, .7);
}

.banner-prev {
  left: 12px;
}

.banner-next {
  right: 12px;
}

/* ─── Section ────────────────────────────────────────────────── */
.section {
  padding: 24px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.section-more {
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
}

.section-more:hover {
  color: var(--red);
}

/* ─── Category Cards ─────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}

.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px 10px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.cat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.cat-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.cat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* ─── Product Grid ───────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: #a0a0a0;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1;
}

.product-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f7f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .3s ease;
}

.product-card:hover .product-img {
  transform: scale(1.06);
}

.product-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  display: -webkit-box;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.stars .star {
  color: #f90;
  font-size: 13px;
}

.stars .star.empty {
  color: #ccc;
}

.review-count {
  font-size: 11px;
  color: var(--text-muted);
}

.product-price {
  margin-bottom: 8px;
}

.price-current {
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
}

.price-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 4px;
}

.price-discount {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  margin-left: 4px;
}

.product-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.product-actions .btn {
  flex: 1;
  padding: 8px 6px;
  font-size: 12px;
}

.stock-low {
  font-size: 11px;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ─── Product Detail ─────────────────────────────────────────── */
.product-detail {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 24px;
  margin: 16px 0;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.product-gallery {
  position: relative;
}

.main-image {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f8f8;
  padding: 20px;
}

.main-image img {
  max-height: 400px;
  object-fit: contain;
}

.thumb-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.thumb-item {
  width: 64px;
  height: 64px;
  border: 2px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.thumb-item.active,
.thumb-item:hover {
  border-color: var(--primary);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail-info h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-detail-brand {
  color: var(--blue);
  font-size: 13px;
  margin-bottom: 10px;
}

.product-detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.product-detail-price {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.detail-price-current {
  font-size: 28px;
  font-weight: 800;
  color: var(--red);
}

.detail-price-original {
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
}

.detail-price-savings {
  display: block;
  font-size: 14px;
  color: var(--green);
  font-weight: 600;
  margin-top: 4px;
}

.product-stock {
  font-size: 16px;
  font-weight: 600;
}

.stock-in {
  color: var(--green);
}

.stock-out {
  color: var(--red);
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
  margin: 16px 0;
}

.qty-btn {
  width: 38px;
  height: 38px;
  background: #f5f5f5;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--primary);
  color: var(--accent);
}

.qty-input {
  width: 52px;
  height: 38px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.detail-actions .btn {
  padding: 14px;
  font-size: 15px;
}

.product-desc {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.product-desc h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-desc p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 14px;
}

/* ─── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--blue);
}

.breadcrumb a:hover {
  color: var(--red);
}

.breadcrumb span {
  margin: 0 6px;
}

/* ─── Sidebar + Listing Layout ───────────────────────────────── */
.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  padding: 16px 0;
}

.sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px;
  align-self: start;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.filter-group {
  margin-bottom: 18px;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  cursor: pointer;
}

.filter-check input {
  cursor: pointer;
  accent-color: var(--primary);
}

.price-range {
  display: flex;
  gap: 8px;
  align-items: center;
}

.price-range input[type=number] {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
}

.price-range input[type=number]::-webkit-inner-spin-button,
.price-range input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.price-range input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 10px 16px;
  margin-bottom: 14px;
}

.sort-bar select {
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 13px;
}

.results-count {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Cart ───────────────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  padding: 16px 0;
}

.cart-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
}

.cart-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 8px;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: fit-content;
}

.cart-qty button {
  width: 30px;
  height: 30px;
  background: #f0f0f0;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.cart-qty button:hover {
  background: var(--primary);
}

.cart-qty input {
  width: 44px;
  height: 30px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 13px;
}

.cart-remove {
  color: var(--red);
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: none;
  margin-top: 8px;
}

.cart-remove:hover {
  text-decoration: underline;
}

.cart-item-subtotal {
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

/* Order Summary Box */
.order-summary-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 20px;
  align-self: start;
}

.order-summary-box h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 14px;
}

.summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 18px;
}

.summary-savings {
  color: var(--green);
  font-size: 13px;
  text-align: right;
  margin-top: 4px;
}

/* ─── Checkout ───────────────────────────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 16px;
  padding: 16px 0;
}

.checkout-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 24px;
}

.checkout-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 144, 0, .15);
}

.form-group.full {
  grid-column: 1 / -1;
}

.checkout-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
}

.checkout-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
}

.checkout-item-name {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
}

.checkout-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}

.checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.checkout-actions .btn {
  padding: 14px;
  font-size: 15px;
}

/* ─── Order Confirmation ─────────────────────────────────────── */
.confirm-box {
  max-width: 680px;
  margin: 40px auto;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.confirm-header {
  background: linear-gradient(135deg, #067d62, #0d9e71);
  padding: 32px;
  text-align: center;
  color: #fff;
}

.confirm-header .icon {
  font-size: 60px;
  margin-bottom: 12px;
}

.confirm-header h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
}

.confirm-header p {
  opacity: .85;
  font-size: 15px;
}

.confirm-body {
  padding: 24px;
}

.confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.confirm-table th {
  background: #f7f8f8;
  padding: 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.confirm-table td {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ─── Auth Forms ─────────────────────────────────────────────── */
.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-hover);
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo .logo-text {
  font-size: 32px;
}

.auth-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
}

.auth-divider {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 16px 0;
}

.auth-link {
  color: var(--blue);
  font-size: 13px;
}

.auth-link:hover {
  color: var(--red);
}

/* ─── Account Pages ──────────────────────────────────────────── */
.account-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 16px 0;
}

.account-sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px;
  align-self: start;
}

.account-sidebar h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.account-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  transition: var(--transition);
  margin-bottom: 2px;
}

.account-nav a:hover,
.account-nav a.active {
  background: #fef3c7;
  color: var(--accent);
  font-weight: 600;
}

.account-main {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 24px;
}

.account-main h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
}

/* ─── Tables ─────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: #f7f8f8;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: #fafafa;
}

/* ─── Status Badges ──────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-confirmed {
  background: #dbeafe;
  color: #1e40af;
}

.badge-processing {
  background: #ede9fe;
  color: #5b21b6;
}

.badge-shipped {
  background: #d1fae5;
  color: #065f46;
}

.badge-delivered {
  background: #dcfce7;
  color: #166534;
}

.badge-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 24px 0;
}

.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  background: var(--white);
  color: var(--text);
}

.pagination a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--accent);
}

.pagination a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--accent);
  font-weight: 700;
}

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 60px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  margin-bottom: 20px;
}

/* ─── Related Products ───────────────────────────────────────── */
.related-section {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 24px;
  margin-bottom: 20px;
}

/* ─── No Image Placeholder ───────────────────────────────────── */
.no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
  color: #a0aec0;
  font-size: 40px;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .header-actions .btn-ghost {
    padding: 6px;
    font-size: 12px;
  }

  .logo-text {
    font-size: 22px;
  }

  .search-input {
    font-size: 13px;
    padding: 8px 12px;
  }

  .search-btn {
    padding: 8px 14px;
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .search-form {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .header-actions {
    gap: 4px;
  }

  .hide-mobile {
    display: none !important;
  }

  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .account-layout {
    grid-template-columns: 1fr;
  }

  .banner-content h2 {
    font-size: 20px;
  }

  .banner-content {
    padding: 24px;
  }

  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .confirm-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {

  .topbar,
  .cat-nav {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-social,
  .footer-links {
    justify-content: center;
  }
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--accent2);
  color: #fff;
  padding-top: 40px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.footer-desc {
  font-size: 13px;
  color: #ccc;
  margin-bottom: 16px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, .1);
  border-radius: 50%;
  color: #fff;
  transition: var(--transition);
}

.social-link.wa-link {
  width: auto;
  padding: 0 12px;
  border-radius: 20px;
  background: #25d366;
  font-size: 12px;
  font-weight: 600;
}

.social-link:hover {
  background: var(--primary);
  color: var(--accent);
}

.social-link.wa-link:hover {
  background: #128c7e;
  color: #fff;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.footer-links a {
  color: #ccc;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: #999;
}