/* ==========================================================================
   Typography: English Primary + Kalpurush for Bengali
   ========================================================================== */
@font-face {
  font-family: 'Kalpurush';
  src: url('../fonts/kalpurush.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PrimaryFont';
  src: local('Inter'), local('-apple-system'), local('BlinkMacSystemFont'), local('Segoe UI'), local('Roboto');
}

@font-face {
  font-family: 'PrimaryFont';
  src: url('../fonts/kalpurush.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0980-09FF, U+09E6-09EF, U+200C-200D;
}

:root {
  /* Brand Core Variables (Strictly mandated) */
  --dark: #111111;
  --primary: #d90429;
  --primary-dark: #b00020;
  --badge: #ffc107;
  --bg: #f5f5f7;
  --card: #ffffff;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --success: #10b981;

  /* Status Colors (Not brand colors) */
  --stock-in: #10b981;
  --stock-out: #6b7280;

  /* Component Aliases for Complete Brand Coherence */
  --color-primary: var(--primary);
  --color-primary-hover: var(--primary-dark);
  --color-primary-light: rgba(217, 4, 41, 0.08);

  --color-accent: var(--primary);
  --color-accent-hover: var(--primary-dark);
  --color-accent-light: rgba(217, 4, 41, 0.08);

  --color-dark: var(--dark);
  --color-darker: var(--dark);
  --color-gray-900: #111111;
  --color-gray-800: #1f2937;
  --color-gray-700: #374151;
  --color-gray-600: #4b5563;
  --color-gray-500: #6b7280;
  --color-gray-400: #9ca3af;
  --color-gray-300: #d1d5db;
  --color-gray-200: #e5e7eb;
  --color-gray-100: #f3f4f6;
  --color-gray-50: var(--bg);
  --color-white: #ffffff;

  --color-red: var(--primary);
  --color-red-light: rgba(217, 4, 41, 0.1);
  --color-amber: var(--badge);

  --font-sans: 'PrimaryFont', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, 'Kalpurush', sans-serif;
  --font-bangla: 'Kalpurush', 'SolaimanLipi', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --container-max: 1420px;
  --header-height: 64px;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  background-color: var(--bg);
  color: var(--color-gray-800);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Bengali Typography: Kalpurush strictly used for all Bengali content */
.font-kalpurush,
.bangla-text,
.bangla-font,
[lang="bn"],
.prose,
.product-detail-desc {
  font-family: var(--font-bangla);
  line-height: 1.8;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* SVG Icon Helper */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  fill: currentColor;
  vertical-align: middle;
}

/* Top Notification & App Bar */
.top-bar,
.app-bar {
  background-color: var(--dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar a,
.app-bar a {
  color: #ffffff;
}

.top-bar a:hover,
.app-bar a:hover {
  color: var(--primary);
}

/* Main Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--color-gray-200);
  color: var(--color-gray-800);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 40px;
  width: auto;
}

/* Search Form */
.header-search {
  flex: 1;
  max-width: 580px;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.65rem 3rem 0.65rem 1rem;
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  outline: none;
  background-color: var(--bg);
  color: var(--color-gray-800);
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: var(--color-gray-500);
}

.search-input:focus {
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.15);
}

.search-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  width: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

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

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

.cart-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--color-gray-800);
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cart-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(217, 4, 41, 0.05);
}

.cart-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Navigation Bar */
.category-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--color-gray-200);
}

.nav-scroll {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.5rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-gray-700);
  transition: all 0.15s ease;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary) !important;
  background-color: rgba(217, 4, 41, 0.08) !important;
  font-weight: 700;
}

/* Trust / Feature Bar */
.trust-bar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  padding: 1rem 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.trust-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: rgba(217, 4, 41, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-item h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

.trust-item p {
  font-size: 0.75rem;
  color: var(--color-gray-500);
}

/* Hero Slider & Hero Grid */
.hero-slider-section {
  padding: 0.5rem 0 0.75rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr 310px;
    gap: 1rem;
  }
}

.hero-slider-wrap {
  min-width: 0;
  display: flex;
  width: 100%;
}

.hero-slider-wrap .slider-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--dark);
  color: var(--color-white);
  width: 100%;
  aspect-ratio: 13.5 / 5;
  max-height: 340px;
  display: flex;
  align-items: center;
}

.slider-container:has(.slide-content.fallback-slide) {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
  min-height: 240px;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 13.5 / 5;
  max-height: 340px;
  overflow: hidden;
  line-height: 0;
}

.hero-slides-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
  height: 100%;
  aspect-ratio: 13.5 / 5;
  max-height: 340px;
}

.hero-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  line-height: 0;
  aspect-ratio: 13.5 / 5;
  max-height: 340px;
}

.hero-slide-link,
.hero-slide-wrap,
.hero-slide-wrap-inner {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.hero-slide-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 13.5 / 5;
  max-height: 340px;
  object-fit: fill;
  object-position: center;
  display: block;
}

@media (max-width: 991px) {

  .hero-slider-wrap .slider-container,
  .hero-slider,
  .hero-slides-track,
  .hero-slide {
    aspect-ratio: 14 / 5;
    height: auto;
  }

  .hero-slide-img {
    aspect-ratio: 14 / 5;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
  }
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: rgba(17, 17, 17, 0.65);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  padding: 0;
}

.slider-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.08);
}

.slider-arrow-prev {
  left: 0.75rem;
}

.slider-arrow-next {
  right: 0.75rem;
}

.slider-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 10;
  padding: 0.2rem 0.5rem;
  background: rgba(17, 17, 17, 0.5);
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

.slider-dot.active {
  background: var(--primary);
  width: 18px;
}

@media (max-width: 640px) {
  .slider-arrow {
    width: 28px;
    height: 28px;
  }

  .slider-arrow-prev {
    left: 0.4rem;
  }

  .slider-arrow-next {
    right: 0.4rem;
  }
}

/* Special Offer Card */
.hero-special-offer {
  display: flex;
}

.special-offer-card {
  background: var(--card-bg);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 0.8rem 0.85rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: 340px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.special-offer-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.special-offer-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  flex-shrink: 0;
}

.special-offer-tag {
  background: rgba(217, 4, 41, 0.1);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.special-discount-badge {
  background: var(--badge);
  color: #000000;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.special-offer-thumb-wrap {
  width: 100%;
  flex: 1 1 auto;
  min-height: 155px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.5rem;
  padding: 0.45rem;
  box-sizing: border-box;
}

.special-offer-thumb {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.special-offer-card:hover .special-offer-thumb {
  transform: scale(1.05);
}

.special-offer-info {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  margin-top: auto;
}

.special-offer-cat {
  font-size: 0.72rem;
  color: var(--color-gray-500);
  margin-bottom: 0.15rem;
}

.special-offer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark, #111111);
  line-height: 1.3;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.special-offer-title a:hover {
  color: var(--primary);
}

.special-offer-price-box {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
  margin-top: 0;
}

.special-offer-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.special-offer-old-price {
  font-size: 0.78rem;
  color: var(--color-gray-400);
  text-decoration: line-through;
}

.special-offer-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
}

.slider-track {
  width: 100%;
}

.slide-content {
  padding: 2.5rem 1.5rem;
  max-width: 600px;
}

.slide-content.fallback-slide {
  padding: 2.5rem 1.5rem;
  max-width: 600px;
}

.slide-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.slide-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.slide-desc {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:active {
  background-color: var(--primary-dark) !important;
  color: #ffffff !important;
}

.btn-accent {
  background-color: var(--primary);
  color: #ffffff !important;
}

.btn-accent:hover,
.btn-accent:active {
  background-color: var(--primary-dark) !important;
  color: #ffffff !important;
}

.btn-outline {
  border-color: var(--color-gray-300);
  background-color: var(--color-white);
  color: var(--color-gray-700);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* Sections */
.section {
  padding: 1.25rem 0 1.5rem;
}

.section-first {
  padding-top: 0.25rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--color-gray-200);
  padding-bottom: 0.5rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-gray-900);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.55rem;
  width: 45px;
  height: 2px;
  background-color: var(--primary);
}

.view-all-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.view-all-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Product Grid: 5 columns on desktop */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

@media (min-width: 576px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
  }
}

@media (min-width: 820px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
  }
}

@media (min-width: 1080px) {
  .product-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
  }
}

/* Related Products Grid: 5 items on desktop (>= 1024px), 4 items on mobile/tablet (< 1024px) */
@media (min-width: 1024px) {
  .related-products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 1023px) {
  .related-products-grid>.product-card:nth-child(n+5) {
    display: none !important;
  }
}

/* Product Card */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.product-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%;
  /* 1:1 Aspect Ratio */
  background: #f8fafc;
  overflow: hidden;
}

.product-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.45rem;
  transition: transform 0.3s ease;
}

.product-card:hover .product-thumb {
  transform: scale(1.04);
}

.discount-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background-color: var(--badge) !important;
  color: #000000 !important;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.stock-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  background-color: var(--stock-out);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.35rem;
  border-radius: var(--radius-sm);
  z-index: 2;
}

.product-info {
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category-name {
  font-size: 0.7rem;
  color: var(--color-gray-500);
  margin-bottom: 0.2rem;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-gray-800);
  line-height: 1.35;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.product-card:hover .product-title {
  color: var(--primary);
}

.price-box {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.current-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

.old-price {
  font-size: 0.75rem;
  color: var(--color-gray-400);
  text-decoration: line-through;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
}

.btn-order-now {
  background-color: var(--primary);
  color: #ffffff !important;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
}

.btn-order-now:hover,
.btn-order-now:active {
  background-color: var(--primary-dark) !important;
  color: #ffffff !important;
}

.btn-quick-view {
  background-color: var(--color-gray-100);
  color: var(--color-gray-700);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.55rem;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-quick-view:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

/* Category Page Layout */
.category-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .category-layout {
    grid-template-columns: 260px 1fr;
  }
}

.filter-sidebar {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  height: fit-content;
}

.filter-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 0.75rem;
}

.filter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--color-gray-700);
  padding: 0.25rem 0;
}

.filter-link:hover,
.filter-link.active {
  color: var(--color-primary);
  font-weight: 600;
}

.filter-count {
  font-size: 0.75rem;
  color: var(--color-gray-400);
  background: var(--color-gray-100);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.toolbar-select {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-size: 0.85rem;
  outline: none;
}

/* Breadcrumbs */
.breadcrumb-nav {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: var(--color-gray-500);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  width: 100%;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.breadcrumb-item:last-child {
  flex: 1;
  min-width: 0;
}

.breadcrumb-item:last-child span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.breadcrumb-separator {
  color: var(--color-gray-400);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Product Detail Page */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .product-detail-grid {
    grid-template-columns: 1fr 1fr;
    padding: 2.5rem;
  }
}

.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main-image-wrap {
  width: 100%;
  padding-top: 100%;
  position: relative;
  background: #f8fafc;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-gray-200);
}

.main-image-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.gallery-thumb-btn {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-gray-200);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  padding: 2px;
}

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

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

.product-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-detail-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-gray-900);
  line-height: 1.3;
}

.product-price-section {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-gray-200);
  border-bottom: 1px solid var(--color-gray-200);
}

.product-price-big {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
}

.product-old-price-big {
  font-size: 1.1rem;
  color: var(--color-gray-400);
  text-decoration: line-through;
}

.stock-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.stock-in {
  background: #ecfdf5;
  color: var(--stock-in);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.stock-out {
  background: #f3f4f6;
  color: var(--stock-out);
  border: 1px solid rgba(107, 114, 128, 0.25);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--color-gray-100);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
}

.qty-btn:hover {
  background: var(--color-gray-200);
}

.qty-input {
  width: 48px;
  height: 36px;
  border: none;
  text-align: center;
  font-weight: 700;
}

.product-detail-desc {
  margin-top: 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.product-detail-desc h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--color-primary-light);
  padding-bottom: 0.5rem;
}

.prose {
  line-height: 1.8;
  color: var(--color-gray-700);
}

.prose p {
  margin-bottom: 1rem;
}

.prose img {
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

/* Pagination */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-300);
  background: var(--color-white);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-gray-700);
}

.page-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.page-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.page-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Quick View Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-gray-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal-close:hover {
  background: var(--color-gray-200);
}

.modal-body {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 540px) {
  .modal-body {
    grid-template-columns: 220px 1fr;
  }
}

/* Footer */
.site-footer {
  background-color: var(--dark) !important;
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

.footer-col h4 {
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.75);
}

.footer-col a:hover {
  color: var(--primary) !important;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Native Mobile App Bar (< 1024px)
   ========================================================================== */
.app-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background-color: #ffffff;
  color: var(--color-gray-900);
  border-bottom: 1px solid var(--color-gray-200);
  padding-top: env(safe-area-inset-top);
  transition: box-shadow 0.2s ease;
  height: calc(56px + env(safe-area-inset-top));
  box-sizing: border-box;
}

.app-bar.is-scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.app-bar-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
  width: 100%;
}

.app-bar-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-gray-900);
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-decoration: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.app-bar-btn:active {
  background: var(--color-gray-100);
}

.app-bar-btn .icon {
  width: 22px;
  height: 22px;
  color: var(--color-gray-900);
}

.app-bar-logo {
  display: flex;
  align-items: center;
  margin-left: 0.25rem;
  text-decoration: none;
}

.app-bar-logo img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.app-bar-title-wrap {
  flex: 1;
  min-width: 0;
  padding: 0 0.5rem;
}

.app-bar-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.app-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.app-bar-cart {
  position: relative;
}

.app-bar-cart .cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 9999px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.app-bar-search-bar {
  position: absolute;
  top: env(safe-area-inset-top);
  left: 0;
  right: 0;
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid var(--color-gray-200);
  z-index: 20;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.app-bar-search-bar[hidden] {
  display: none !important;
}

.drawer-sub-list[hidden] {
  display: none !important;
}

.app-bar-search-form {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.25rem;
}

.app-bar-search-input {
  flex: 1;
  height: 40px;
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-full);
  padding: 0 1rem;
  color: var(--color-gray-900);
  font-size: 0.95rem;
  outline: none;
}

.app-bar-search-input::placeholder {
  color: var(--color-gray-500);
}

.app-bar-search-input:focus {
  border-color: var(--primary);
  background: #ffffff;
}

.app-bar-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.app-bar-search-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   Native Mobile Navigation Drawer (< 1024px)
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 85%;
  max-width: 320px;
  background: #ffffff;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-header {
  background: #ffffff !important;
  color: var(--color-gray-900) !important;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-gray-200);
  flex-shrink: 0;
}

.drawer-header-brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drawer-phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gray-800);
  text-decoration: none;
  background: var(--color-gray-100);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  width: fit-content;
}

.drawer-phone-chip:active {
  background: var(--primary);
  color: #ffffff;
}

.drawer-close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-100);
  border: none;
  color: var(--color-gray-800);
  border-radius: var(--radius-full);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.drawer-close-btn:active {
  background: var(--primary);
  color: #ffffff;
}

.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0;
}

.drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--color-gray-800);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s ease;
  min-height: 44px;
}

.drawer-link:active {
  background: var(--color-gray-100);
}

.drawer-icon-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-600);
}

.drawer-icon-wrap .icon {
  width: 20px;
  height: 20px;
}

.drawer-divider {
  padding: 0.75rem 1.25rem 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gray-400);
  border-top: 1px solid var(--color-gray-100);
  margin-top: 0.5rem;
}

.drawer-accordion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-accordion-btn {
  width: 48px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-gray-500);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.drawer-accordion-btn:active {
  background: var(--color-gray-100);
}

.accordion-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.drawer-accordion-item.is-open .accordion-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.drawer-sub-list {
  list-style: none;
  background: var(--color-gray-50);
  padding: 0.35rem 0 0.35rem 2rem;
  margin: 0;
  border-left: 3px solid var(--primary);
}

.drawer-sub-link {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: var(--color-gray-700);
  text-decoration: none;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.drawer-sub-link:active {
  color: var(--primary);
  background: rgba(217, 4, 41, 0.05);
}

.mobile-drawer-footer {
  padding: 0.75rem 0.5rem;
  border-top: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  flex-shrink: 0;
}

.drawer-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem 0.2rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  min-height: 42px;
  white-space: nowrap;
}

.drawer-action-btn .icon {
  width: 14px;
  height: 14px;
}

.drawer-action-btn.action-call {
  background: var(--dark);
  color: #ffffff;
}

.drawer-action-btn.action-wa {
  background: #25D366;
  color: #ffffff;
}

.drawer-action-btn.action-messenger {
  background: #0084FF;
  color: #ffffff;
}

/* ==========================================================================
   Native Mobile Bottom Navigation (< 1024px)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #ffffff;
  border-top: 1px solid var(--color-gray-200);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 950;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.07);
  box-sizing: border-box;
  transition: transform 0.25s ease;
}

body.keyboard-open .bottom-nav {
  transform: translateY(100%);
}

.bottom-nav-item {
  flex: 1;
  min-height: 48px;
  min-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--color-gray-500);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:active {
  transform: scale(0.94);
  opacity: 0.85;
}

.bottom-nav-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
}

.bottom-nav-icon .icon {
  width: 22px;
  height: 22px;
}

.bottom-nav-item.active {
  color: var(--primary) !important;
  font-weight: 700;
}

.bottom-nav-item.active .bottom-nav-icon {
  color: var(--primary) !important;
}

.bottom-nav-cart-icon {
  position: relative;
}

.bottom-nav-cart-icon .cart-badge {
  position: absolute;
  top: -2px;
  right: -6px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  line-height: 17px;
  border-radius: 9999px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Mobile Bottom Sheets (Categories, Contact, Filter) (< 1024px)
   ========================================================================== */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.sheet-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  z-index: 999;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.22);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-sheet.is-open {
  transform: translateY(0);
}

.sheet-drag-handle {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  cursor: grab;
}

.sheet-drag-handle .handle-bar {
  width: 40px;
  height: 4px;
  background: var(--color-gray-300);
  border-radius: 9999px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.sheet-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0;
}

.sheet-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-gray-100);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-600);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sheet-close-btn:active {
  background: var(--color-gray-200);
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.25rem;
}

.categories-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.categories-tile-grid.categories-main-only {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.category-main-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 0.95rem;
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-gray-900);
  font-weight: 700;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.category-main-card:active,
.category-main-card:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 4, 41, 0.08);
}

.category-main-card .tile-name {
  flex: 1;
  line-height: 1.25;
}

.category-main-card .tile-arrow {
  color: var(--color-gray-400);
  flex-shrink: 0;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.category-main-card:hover .tile-arrow,
.category-main-card:active .tile-arrow {
  color: var(--primary);
  transform: translateX(2px);
}

.category-tile-card {
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
}

.category-tile-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-gray-900);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.category-tile-main:hover {
  color: var(--primary);
}

.tile-icon-bubble {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: rgba(217, 4, 41, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tile-icon-bubble .icon {
  width: 18px;
  height: 18px;
}

.category-tile-subs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid var(--color-gray-200);
  padding-top: 0.5rem;
}

.tile-sub-link {
  font-size: 0.82rem;
  color: var(--color-gray-600);
  text-decoration: none;
  padding: 0.2rem 0;
}

.tile-sub-link:active {
  color: var(--primary);
}

/* ==========================================================================
   Mobile Listing Enhancements (< 1024px)
   ========================================================================== */
.mobile-subcat-chips-bar {
  position: sticky;
  top: calc(56px + env(safe-area-inset-top));
  z-index: 850;
  background: #ffffff;
  border-bottom: 1px solid var(--color-gray-200);
  padding: 0.5rem 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.chips-scroll {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0.5rem;
  padding: 0 1rem;
}

.chips-scroll::-webkit-scrollbar {
  display: none;
}

.subcat-chip {
  flex-shrink: 0;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.subcat-chip:active {
  background: var(--color-gray-200);
}

.subcat-chip.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
}

.btn-filter-mobile {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gray-800);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-filter-mobile:active {
  background: var(--color-gray-100);
}

.btn-filter-mobile .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.mobile-load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-load-more.is-loading .load-more-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Product Detail Mobile Gallery & Sticky Bar (< 1024px)
   ========================================================================== */
.mobile-gallery-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--color-gray-200);
  margin-bottom: 1rem;
}

.mobile-gallery-snap {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-gallery-snap::-webkit-scrollbar {
  display: none;
}

.mobile-gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: #ffffff;
}

.mobile-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mobile-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0.5rem 0 0.75rem;
}

.mobile-gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--color-gray-300);
  transition: all 0.2s ease;
}

.mobile-gallery-dot.active {
  width: 18px;
  background: var(--primary);
}

.mobile-sticky-action-bar {
  position: fixed;
  bottom: calc(60px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid var(--color-gray-200);
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 940;
}

.sticky-action-info {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.sticky-price-main {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.sticky-price-old {
  font-size: 0.85rem;
  color: var(--color-gray-400);
  text-decoration: line-through;
}

.sticky-action-buttons {
  flex-shrink: 0;
}

.sticky-order-btn {
  padding: 0.65rem 1.5rem !important;
  font-size: 0.95rem !important;
  font-weight: 700;
  border-radius: var(--radius-md) !important;
}

/* ==========================================================================
   Responsive Breakpoints System (< 1024px vs >= 1024px)
   ========================================================================== */
@media (max-width: 1023px) {

  .top-bar,
  .site-header,
  .category-nav,
  .desktop-gallery-wrap,
  .filter-sidebar,
  .site-footer,
  .hero-special-offer,
  .trust-bar {
    display: none !important;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-slider-section {
    padding: 0.25rem 0 0.5rem !important;
  }

  .hero-slider-wrap .slider-container,
  .hero-slider,
  .hero-slides-track,
  .hero-slide {
    aspect-ratio: 14 / 5 !important;
    height: auto !important;
  }

  .hero-slide-img {
    aspect-ratio: 14 / 5 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: fill !important;
    object-position: center !important;
    border-radius: var(--radius-md) !important;
  }

  .hero-slider-wrap {
    border-radius: var(--radius-md) !important;
    aspect-ratio: 14 / 5 !important;
  }

  .slider-arrow {
    width: 26px !important;
    height: 26px !important;
  }

  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }

  /* Extra padding when mobile sticky action bar is present */
  body:has(.mobile-sticky-action-bar) {
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }

  .section-header {
    margin-bottom: 0.85rem !important;
    padding-bottom: 0.4rem !important;
  }

  .section-title {
    font-size: 0.95rem !important;
  }

  .view-all-link {
    font-size: 0.8rem !important;
    white-space: nowrap !important;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .product-card {
    border-radius: var(--radius-md);
  }

  .product-card-img-wrap {
    height: 160px !important;
  }

  .product-card-info {
    padding: 0.6rem 0.5rem !important;
  }

  .product-title {
    font-size: 1.05rem !important;
    line-height: 1.3 !important;
    height: auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }

  .product-price-current {
    font-size: 0.95rem !important;
  }

  .product-card-actions .btn {
    padding: 0.4rem 0.5rem !important;
    font-size: 0.8rem !important;
  }

  .category-layout {
    grid-template-columns: 1fr !important;
  }

  .product-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* Hide desktop pagination when Load More button is available */
  .pagination-wrapper {
    display: none;
  }
}

@media (min-width: 1024px) {

  .app-bar,
  .app-bar-placeholder,
  .bottom-nav,
  .mobile-drawer,
  .drawer-overlay,
  .bottom-sheet,
  .sheet-overlay,
  .mobile-subcat-chips-bar,
  .btn-filter-mobile,
  .mobile-load-more-wrap,
  .mobile-sticky-action-bar,
  .mobile-gallery-wrapper {
    display: none !important;
  }

  body {
    padding-bottom: 0 !important;
  }

  .desktop-gallery-wrap {
    display: block !important;
  }

  .filter-sidebar {
    display: block !important;
  }

  .pagination-wrapper {
    display: block !important;
  }
}

@media (max-width: 480px) {

  .hero-slider-wrap .slider-container,
  .hero-slider,
  .hero-slides-track,
  .hero-slide {
    aspect-ratio: 14 / 5 !important;
    height: auto !important;
  }

  .hero-slide-img {
    aspect-ratio: 14 / 5 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: fill !important;
    object-position: center !important;
  }

  .section-title {
    font-size: 0.9rem !important;
  }

  .view-all-link {
    font-size: 0.78rem !important;
  }

  .product-grid {
    gap: 0.5rem !important;
  }

  .product-card-img-wrap {
    height: 145px !important;
  }

  .categories-tile-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Bengali Specific Typography Support */
.font-kalpurush,
.bangla-text,
.bangla-font,
[lang="bn"],
.prose,
.product-detail-desc {
  font-family: var(--font-bangla);
  line-height: 1.8;
}



/* Mobile Description Truncate */
@media (max-width: 991px) {
  .mobile-desc-truncate {
    max-height: 120px;
    overflow: hidden;
    position: relative;
  }

  .mobile-desc-truncate::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(transparent, var(--color-white));
    pointer-events: none;
  }

  .mobile-read-more-wrap {
    display: block;
  }
}

@media (min-width: 992px) {
  .mobile-desc-truncate {
    max-height: none !important;
    overflow: visible !important;
  }

  .mobile-desc-truncate::after {
    display: none !important;
  }

  .mobile-read-more-wrap {
    display: none !important;
  }
}

/* ==========================================================================
   Checkout Page Styles (Mobile-First, Conversion-Optimized)
   ========================================================================== */
.checkout-page {
  background: var(--bg);
  min-height: 80vh;
  padding: 1.25rem 0 2.5rem;
}

@media (max-width: 1023px) {
  body:has(.checkout-sticky-bar) .checkout-page {
    padding-bottom: calc(85px + env(safe-area-inset-bottom));
  }
}

/* 3-Step Progress Indicator */
.checkout-steps {
  margin-bottom: 1.5rem;
}

.checkout-steps-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gray-400);
}

.checkout-step .step-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.checkout-step .step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--border);
  color: var(--color-gray-600);
}

.checkout-step.step-complete .step-num {
  background: var(--success);
  color: #fff;
}

.checkout-step.step-complete {
  color: var(--color-gray-700);
}

.checkout-step.step-active {
  color: var(--primary);
  font-weight: 700;
}

.checkout-step.step-active .step-num {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.2);
}

.checkout-step-separator {
  width: 30px;
  height: 2px;
  background: var(--border);
}

/* Layout Grid */
.checkout-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .checkout-layout-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
    gap: 2rem;
  }

  .checkout-summary-wrap {
    order: 2;
    position: sticky;
    top: 84px;
  }

  .checkout-form-wrap {
    order: 1;
  }
}

/* Form & Summary Cards */
.checkout-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
  .checkout-card {
    padding: 1.75rem;
  }
}

/* Order Summary Container Card (< 1024px) */
#checkout-summary-card {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

/* Accordion Header (Looks identical whether open or closed) */
.summary-accordion-header {
  width: 100%;
  background: #f8fafc;
  border: none;
  border-radius: 0;
  padding: 0.95rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.summary-accordion-header:hover {
  background: #f1f5f9;
}

.summary-accordion-header[aria-expanded="true"] {
  border-bottom: 1px solid var(--border);
}

.summary-header-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
}

.summary-toggle-icon {
  width: 18px;
  height: 18px;
  color: var(--color-gray-500);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.summary-accordion-header[aria-expanded="true"] .summary-toggle-icon {
  transform: rotate(180deg);
}

.summary-header-total {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
  letter-spacing: -0.01em;
}

/* Accordion Content */
.summary-accordion-content {
  display: none;
  padding: 1.15rem;
  background: #ffffff;
}

.summary-accordion-header[aria-expanded="true"]+.summary-accordion-content {
  display: block;
}

/* Items List in Summary */
.checkout-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-bottom: 1.15rem;
}

.checkout-item-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--color-gray-100);
}

.checkout-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.checkout-item-thumb {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.checkout-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.checkout-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkout-item-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}

.checkout-item-name:hover {
  color: var(--primary);
}

.checkout-item-remove-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--color-gray-400);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.checkout-item-remove-btn:hover {
  color: var(--primary);
  background: rgba(217, 4, 41, 0.08);
}

.checkout-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.checkout-item-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.checkout-unit-calc {
  font-size: 0.76rem;
  color: var(--color-gray-500);
}

/* Stepper (- / +) */
.checkout-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  height: 32px;
}

.checkout-stepper-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border: none;
  background: var(--color-gray-100);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
}

.checkout-stepper-btn:hover:not(:disabled) {
  background: var(--color-gray-200);
}

.checkout-stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.checkout-stepper-input {
  width: 34px;
  height: 32px;
  border: none;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  padding: 0;
  -moz-appearance: textfield;
}

.checkout-stepper-input::-webkit-outer-spin-button,
.checkout-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Totals Breakdown */
.checkout-totals-box {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.95rem 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-gray-600);
}

.checkout-total-row-final {
  border-top: 1.5px dashed var(--border);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

/* Desktop vs Mobile Responsiveness */
@media (min-width: 1024px) {
  #checkout-summary-card {
    padding: 1.5rem;
  }

  .summary-accordion-header {
    pointer-events: none;
    background: transparent;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--border);
  }

  .summary-toggle-icon {
    display: none;
  }

  .summary-accordion-content {
    display: block !important;
    padding: 1rem 0 0;
  }

  .desktop-place-order-wrap {
    display: block;
    margin-top: 1.25rem;
  }
}

@media (max-width: 1023px) {
  .desktop-place-order-wrap {
    display: none !important;
  }
}

/* Form Styles */
.checkout-form-group {
  margin-bottom: 1.15rem;
}

.checkout-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.checkout-input,
.checkout-select,
.checkout-textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-size: 16px;
  /* Prevents iOS auto-zoom */
  font-family: inherit;
  color: var(--dark);
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-textarea {
  min-height: 84px;
  resize: vertical;
}

.checkout-textarea.checkout-address-single-line {
  min-height: 48px;
  height: 48px;
  resize: none;
  overflow-y: hidden;
  line-height: 1.4;
  padding: 0.7rem 0.95rem;
  box-sizing: border-box;
}

.checkout-input:focus,
.checkout-select:focus,
.checkout-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.15);
}

.checkout-input.is-invalid,
.checkout-select.is-invalid,
.checkout-textarea.is-invalid {
  border-color: var(--primary);
  background: rgba(217, 4, 41, 0.02);
}

.checkout-error-msg {
  display: none;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.35rem;
}

.checkout-error-msg.show {
  display: flex;
}

/* Delivery Area Radio Cards */
.delivery-area-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.delivery-area-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.75rem;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
}

.delivery-area-card:hover {
  border-color: var(--color-gray-400);
}

.delivery-area-card.selected {
  border-color: var(--primary);
  background: rgba(217, 4, 41, 0.04);
}

.delivery-area-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.delivery-area-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--dark);
}

.delivery-area-fee {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.2rem;
}

/* Payment Method Card */
.payment-method-card {
  background: rgba(217, 4, 41, 0.03);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.payment-method-radio {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

/* Sticky Place-Order Bar on Mobile (< 1024px) */
.checkout-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 950;
  transition: transform 0.2s ease;
}

.sticky-bar-left {
  display: flex;
  flex-direction: column;
}

.sticky-bar-total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.sticky-bar-caption {
  font-size: 0.74rem;
  color: var(--color-gray-500);
}

.sticky-bar-btn {
  flex: 1;
  max-width: 220px;
  min-height: 52px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

@media (min-width: 1024px) {
  .checkout-sticky-bar {
    display: none !important;
  }
}

/* Hide sticky bar when mobile keyboard is open */
body.keyboard-open .checkout-sticky-bar {
  transform: translateY(120%);
  pointer-events: none;
}

body.keyboard-open .checkout-inline-submit-wrap {
  display: block !important;
}

.checkout-inline-submit-wrap {
  display: none;
  margin-top: 1.25rem;
}

@media (min-width: 1024px) {
  .checkout-inline-submit-wrap {
    display: none !important;
  }

  .desktop-place-order-wrap {
    display: block;
    margin-top: 1.25rem;
  }
}

@media (max-width: 1023px) {
  .desktop-place-order-wrap {
    display: none;
  }
}

/* Accessibility & Animation Reductions */
@media (prefers-reduced-motion: reduce) {

  .summary-toggle-icon,
  .checkout-input,
  .checkout-sticky-bar,
  .custom-dialog-card {
    transition: none !important;
  }
}

/* Custom Confirmation Popup Dialog */
.custom-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.custom-dialog-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.custom-dialog-card {
  background: #ffffff;
  border-radius: var(--radius-xl, 16px);
  width: 100%;
  max-width: 380px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
  transform: scale(0.92) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.custom-dialog-backdrop.is-open .custom-dialog-card {
  transform: scale(1) translateY(0);
}

.custom-dialog-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fee2e2;
  color: var(--primary, #d90429);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
}

.custom-dialog-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--dark, #111111);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.custom-dialog-message {
  font-size: 0.92rem;
  color: var(--color-gray-600, #4b5563);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.custom-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.custom-dialog-btn-cancel {
  min-height: 44px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md, 8px);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.custom-dialog-btn-cancel:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.custom-dialog-btn-confirm {
  min-height: 44px;
  background: var(--primary, #d90429);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(217, 4, 41, 0.25);
  transition: background 0.15s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.custom-dialog-btn-confirm:hover {
  background: var(--primary-dark, #b70020);
}

.custom-dialog-btn-confirm:active {
  transform: scale(0.98);
}

/* Success Page Action Buttons in ONE single row */
.success-actions-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 480px;
  margin: 1.75rem auto 0;
  flex-wrap: nowrap;
}

.success-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  height: 48px;
  padding: 0 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md, 10px);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  letter-spacing: 0.01em;
  user-select: none;
  white-space: nowrap;
}

.success-btn i,
.success-btn svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.success-btn:hover i,
.success-btn:hover svg {
  transform: scale(1.12);
}

.success-btn-continue {
  flex: 1;
  min-width: 0;
}

.success-btn-icon-only {
  width: 48px;
  min-width: 48px;
  padding: 0;
  flex-shrink: 0;
  font-size: 1.18rem;
}

.success-btn-primary {
  background: var(--primary, #d90429);
  color: #ffffff;
  border: 1px solid var(--primary, #d90429);
  box-shadow: 0 4px 14px rgba(217, 4, 41, 0.25);
}

.success-btn-primary:hover {
  background: var(--primary-dark, #b70020);
  border-color: var(--primary-dark, #b70020);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(217, 4, 41, 0.35);
}

.success-btn-primary:active {
  transform: translateY(0);
}

.success-btn-outline {
  background: #ffffff;
  color: var(--dark, #111111);
  border: 1.5px solid var(--border, #e2e8f0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.success-btn-outline:hover {
  background: #f8fafc;
  border-color: var(--dark, #111111);
  color: var(--dark, #111111);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.success-btn-outline:active {
  transform: translateY(0);
}

.success-btn-whatsapp {
  background: #25D366;
  color: #ffffff;
  border: 1px solid #20bd5a;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
}

.success-btn-whatsapp:hover {
  background: #20bd5a;
  border-color: #1da850;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.success-btn-whatsapp:active {
  transform: translateY(0);
}

@media (max-width: 767px) {
  .success-actions-wrap {
    justify-content: center;
    gap: 0.85rem;
  }

  .success-btn-continue {
    flex: 0 0 48px !important;
    width: 48px !important;
    min-width: 48px !important;
    padding: 0 !important;
    font-size: 1.18rem !important;
  }

  .success-continue-text {
    display: none !important;
  }
}

/* Desktop Header Profile Button */
.header-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--color-gray-800);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.header-profile-btn .icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.header-profile-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(217, 4, 41, 0.05);
}

/* ==========================================================================
   Customer Authentication (Login & Register) & Profile
   ========================================================================== */
.auth-page {
  min-height: calc(100vh - 120px);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 3rem;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0;
}

.auth-card {
  background: #ffffff;
  border-radius: var(--radius-lg, 12px);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 2rem 1.75rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .auth-page {
    padding: 1.25rem 0.75rem 2rem;
    align-items: center;
  }

  .auth-card {
    padding: 1.5rem 1.15rem;
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
  display: block;
}

.auth-logo-link {
  display: inline-block;
  margin-bottom: 0.85rem;
  text-decoration: none;
}

.auth-logo-img {
  max-height: 36px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.auth-mobile-title-wrap {
  display: none;
}

.auth-mobile-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark, #111111);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

@media (max-width: 480px) {
  .auth-logo-link {
    display: none !important;
  }

  .auth-mobile-title-wrap {
    display: block;
  }

  .auth-header {
    margin-bottom: 1.15rem;
  }
}

.auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--dark, #111111);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--color-gray-600, #4b5563);
  line-height: 1.4;
  margin: 0;
}

/* Auth Tabs Navigation */
.auth-tabs-nav {
  display: flex;
  background: var(--bg, #f5f5f7);
  padding: 4px;
  border-radius: var(--radius-md, 8px);
  margin-bottom: 1.5rem;
  gap: 4px;
  border: 1px solid var(--border, #e5e7eb);
}

.auth-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--color-gray-600, #4b5563);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

@media (max-width: 480px) {
  .auth-tab-btn {
    font-size: 0.88rem;
    padding: 0.65rem 0.5rem;
    gap: 0.4rem;
  }
}

.auth-tab-btn svg {
  flex-shrink: 0;
}

.auth-tab-btn:hover:not(.active) {
  color: var(--dark, #111111);
  background: rgba(0, 0, 0, 0.04);
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--primary, #d90429);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-tab-pane {
  display: block;
}

.auth-tab-pane[hidden] {
  display: none !important;
}

.auth-address-2line {
  min-height: 56px;
  height: 56px;
  line-height: 1.35;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  resize: none;
}

/* Auth Alerts */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md, 8px);
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.auth-alert svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.auth-alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

.auth-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

/* Auth Form Controls */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.auth-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark, #111111);
}

.auth-label .text-primary {
  color: var(--primary, #d90429);
}

.auth-input,
.auth-textarea {
  width: 100%;
  font-size: 16px;
  /* Prevents auto-zoom on iOS */
  font-family: inherit;
  color: var(--dark, #111111);
  background: #ffffff;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  padding: 0 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.auth-input {
  height: 48px;
  /* Large 48px touch target */
}

.auth-textarea {
  padding: 0.75rem 0.85rem;
  resize: vertical;
  min-height: 78px;
}

.auth-input:focus,
.auth-textarea:focus {
  outline: none;
  border-color: var(--primary, #d90429);
  box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.12);
}

.auth-input.is-invalid,
.auth-textarea.is-invalid {
  border-color: #ef4444;
  background-color: #fffafb;
}

.auth-input.is-invalid:focus,
.auth-textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Password Toggle Field */
.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-password-wrap .auth-input {
  padding-right: 44px;
}

.auth-toggle-pwd {
  position: absolute;
  right: 0;
  top: 0;
  height: 48px;
  width: 44px;
  border: none;
  background: transparent;
  color: var(--color-gray-500, #6b7280);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.auth-toggle-pwd:hover {
  color: var(--dark, #111111);
}

/* Inline Error Message */
.auth-error-msg {
  display: none;
  align-items: center;
  gap: 0.35rem;
  color: #dc2626;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 0.2rem;
  line-height: 1.35;
}

.auth-error-msg.show {
  display: flex;
}

.auth-error-msg svg {
  flex-shrink: 0;
}

/* Remember Me Checkbox */
.auth-remember-wrap {
  display: flex;
  align-items: center;
  margin: -0.25rem 0 0.15rem;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--color-gray-700, #374151);
  cursor: pointer;
  user-select: none;
}

.auth-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary, #d90429);
  cursor: pointer;
}

/* Primary Auth Submit Button */
.auth-submit-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius-md, 8px);
  background: var(--primary, #d90429);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(217, 4, 41, 0.25);
  transition: background-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.auth-submit-btn:hover:not(:disabled) {
  background: var(--primary-dark, #b00020);
  box-shadow: 0 6px 18px rgba(217, 4, 41, 0.35);
  transform: translateY(-1px);
}

.auth-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Switch Links */
.auth-switch-wrap {
  text-align: center;
  font-size: 0.88rem;
  color: var(--color-gray-600, #4b5563);
  margin-top: 0.25rem;
}

.auth-switch-link {
  color: var(--primary, #d90429);
  font-weight: 700;
  text-decoration: none;
  margin-left: 0.35rem;
  transition: color 0.15s ease;
}

.auth-switch-link:hover {
  color: var(--primary-dark, #b00020);
  text-decoration: underline;
}

/* Profile Dashboard Layout */
.profile-page-main {
  background: var(--bg, #f8fafc);
  min-height: 80vh;
  padding: 1.25rem 0 2.5rem;
}

.profile-container {
  max-width: 1100px;
  margin: 0 auto;
}

.profile-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .profile-layout-grid {
    grid-template-columns: 280px 1fr;
    gap: 1.75rem;
  }
}

.profile-layout-left {
  display: none;
}

@media (min-width: 1024px) {
  .profile-layout-left {
    display: block;
    position: sticky;
    top: 90px;
  }

  .profile-mobile-nav-block {
    display: none !important;
  }
}

/* Profile Cards */
.profile-card {
  background: #ffffff;
  border-radius: var(--radius-lg, 12px);
  border: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .profile-card {
    padding: 1.5rem;
  }
}

/* Profile Hero / Header Card */
.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  flex-wrap: wrap;
}

.profile-avatar-circle {
  border-radius: 50%;
  background: var(--primary, #d90429);
  color: #ffffff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.profile-avatar-lg {
  width: 58px;
  height: 58px;
  font-size: 1.25rem;
  box-shadow: 0 3px 10px rgba(217, 4, 41, 0.25);
}

.profile-avatar-md {
  width: 44px;
  height: 44px;
  font-size: 1rem;
}

.profile-hero-info {
  flex: 1;
  min-width: 180px;
}

.profile-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #16a34a;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-bottom: 4px;
}

.profile-hero-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark, #111111);
  margin: 0;
  line-height: 1.25;
}

.profile-hero-phone {
  font-size: 0.88rem;
  color: var(--color-gray-600, #4b5563);
  margin: 2px 0 0;
}

.profile-hero-address {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--color-gray-500, #6b7280);
  margin: 4px 0 0;
}

.profile-hero-action {
  margin-left: auto;
}

.profile-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md, 8px);
}

.profile-hero-header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 240px;
}

/* Account Quick Stats Strip */
.profile-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.profile-stat-box {
  background: #ffffff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  padding: 0.85rem 1rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  color: inherit;
}

.profile-stat-box:hover {
  transform: translateY(-2px);
  border-color: var(--primary, #d90429);
  box-shadow: 0 4px 14px rgba(217, 4, 41, 0.08);
}

.profile-stat-box:active {
  transform: scale(0.98);
}

.profile-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.profile-stat-box:hover .profile-stat-icon {
  transform: scale(1.08);
}

.profile-stat-icon-orders {
  background: rgba(217, 4, 41, 0.08);
  color: var(--primary, #d90429);
}

.profile-stat-icon-active {
  background: #fef3c7;
  color: #d97706;
}

.profile-stat-icon-delivered {
  background: #dcfce7;
  color: #16a34a;
}

.profile-stat-content {
  min-width: 0;
}

.profile-stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark, #111111);
  line-height: 1.1;
}

.profile-stat-num.text-warning {
  color: #d97706;
}

.profile-stat-num.text-success {
  color: #16a34a;
}

.profile-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gray-500, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Mobile Menu List Rows (56px tall) */
.profile-mobile-nav-block {
  margin-top: 1.25rem;
}

.profile-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-gray-500, #6b7280);
  margin-bottom: 0.65rem;
  padding-left: 0.25rem;
}

.profile-menu-list {
  background: #ffffff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.profile-menu-row {
  min-height: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--dark, #111111);
  background: #ffffff;
  border: none;
  border-bottom: 1px solid var(--border, #e5e7eb);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.04);
  transition: background-color 0.12s ease;
}

.profile-menu-row:last-child {
  border-bottom: none;
}

.profile-menu-row:active {
  background-color: var(--color-gray-50, #f9fafb);
}

.profile-menu-row.active {
  background-color: rgba(217, 4, 41, 0.05);
}

.profile-menu-row.active .profile-menu-label {
  color: var(--primary, #d90429);
  font-weight: 700;
}

.profile-menu-row.active .profile-menu-chevron {
  color: var(--primary, #d90429);
}

.profile-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-menu-label {
  flex: 1;
}

.profile-menu-badge {
  background: var(--primary, #d90429);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}

.profile-menu-chevron {
  color: var(--color-gray-400, #9ca3af);
  flex-shrink: 0;
}

/* Profile Sidebar for Desktop */
.profile-sidebar-card {
  padding: 1.25rem 0.75rem;
}

.profile-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.5rem 1.15rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
  margin-bottom: 0.75rem;
}

.profile-sidebar-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark, #111111);
}

.profile-sidebar-phone {
  font-size: 0.8rem;
  color: var(--color-gray-500, #6b7280);
}

.profile-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md, 8px);
  color: var(--color-gray-700, #374151);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}

.profile-nav-item:hover {
  background: var(--color-gray-100, #f3f4f6);
  color: var(--dark, #111111);
}

.profile-nav-item.active {
  background: rgba(217, 4, 41, 0.08);
  color: var(--primary, #d90429);
  font-weight: 700;
  border-left: 3px solid var(--primary, #d90429);
}

.profile-nav-item.active .profile-nav-icon {
  color: var(--primary, #d90429);
}

.profile-nav-item.active .profile-nav-chevron {
  color: var(--primary, #d90429);
  transform: translateX(2px);
}

/* Mobile Profile Navigation (Deprecated tabs hidden) */
.profile-mobile-tabs {
  display: none !important;
}

.profile-mobile-tabs::-webkit-scrollbar {
  display: none;
}

.profile-mobile-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: max-content;
}

.profile-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid var(--border, #e5e7eb);
  color: var(--color-gray-700, #374151);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.profile-tab-pill:hover {
  background: var(--color-gray-50, #f9fafb);
  border-color: var(--color-gray-300, #d1d5db);
  color: var(--dark, #111111);
}

.profile-tab-pill svg {
  flex-shrink: 0;
  color: var(--color-gray-500, #6b7280);
}

.profile-tab-pill.active {
  background: var(--primary, #d90429);
  border-color: var(--primary, #d90429);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(217, 4, 41, 0.25);
}

.profile-tab-pill.active svg {
  color: #ffffff;
}

.profile-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
  line-height: 1.2;
}

.profile-tab-pill:not(.active) .profile-tab-badge {
  background: rgba(217, 4, 41, 0.1);
  color: var(--primary, #d90429);
}

@media (min-width: 1024px) {
  .profile-mobile-tabs {
    display: none !important;
  }
}


.profile-nav-item.profile-nav-logout {
  color: #dc2626;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border, #e5e7eb);
  padding-top: 0.75rem;
}

.profile-nav-item.profile-nav-logout:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.profile-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Toast Alert */
.profile-toast-alert {
  position: fixed;
  bottom: calc(75px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #ffffff;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1000;
  max-width: 90vw;
  width: max-content;
  animation: toastSlideUp 0.25s ease-out;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 15px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.profile-toast-alert svg {
  color: #22c55e;
  flex-shrink: 0;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 0.5rem;
}

.toast-close-btn:hover {
  color: #ffffff;
}

/* Breadcrumb / Top Back Link */
.profile-top-breadcrumb {
  margin-bottom: 1rem;
}

.profile-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dark, #111111);
  background: #ffffff;
  border: 1px solid var(--border, #e5e7eb);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md, 8px);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.profile-back-link:hover,
.profile-back-link:active {
  color: var(--primary, #d90429);
  border-color: var(--primary, #d90429);
  background: rgba(217, 4, 41, 0.04);
}

/* Profile Card Titles & Headers */
.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.profile-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark, #111111);
  margin: 0;
}

.profile-card-subtitle {
  font-size: 0.85rem;
  color: var(--color-gray-500, #6b7280);
  margin: 3px 0 0;
}

.profile-view-all-link {
  color: var(--primary, #d90429);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.profile-view-all-link:hover {
  text-decoration: underline;
}

/* Profile Forms & Inputs */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.profile-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark, #111111);
}

.req-star {
  color: var(--primary, #d90429);
}

.profile-input,
.profile-textarea {
  width: 100%;
  font-size: 16px;
  font-family: inherit;
  color: var(--dark, #111111);
  background: #ffffff;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  padding: 0 0.85rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-input {
  height: 48px;
}

.profile-textarea {
  padding: 0.75rem 0.85rem;
  min-height: 80px;
  resize: vertical;
}

.profile-input:focus,
.profile-textarea:focus {
  outline: none;
  border-color: var(--primary, #d90429);
  box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.12);
}

.profile-input-readonly-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-input-readonly {
  background: var(--color-gray-100, #f3f4f6) !important;
  color: var(--color-gray-600, #4b5563) !important;
  cursor: not-allowed;
  padding-right: 100px;
}

.profile-verified-badge {
  position: absolute;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #16a34a;
}

.profile-input-hint {
  font-size: 0.8rem;
  color: var(--color-gray-500, #6b7280);
  line-height: 1.35;
}

.profile-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-password-wrap .profile-input {
  padding-right: 44px;
}

.profile-toggle-pass {
  position: absolute;
  right: 0;
  top: 0;
  height: 48px;
  width: 44px;
  border: none;
  background: transparent;
  color: var(--color-gray-500, #6b7280);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-error-box {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md, 8px);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.88rem;
  margin-bottom: 1.15rem;
}

.profile-error-box p {
  margin: 0;
  line-height: 1.4;
}

.profile-submit-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md, 8px);
}

/* Status Chips */
.profile-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.2px;
}

.profile-status-chip.status-chip-lg {
  padding: 5px 14px;
  font-size: 0.88rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-chip-pending {
  background: #fef3c7;
  color: #b45309;
}

.status-chip-confirmed {
  background: #e0f2fe;
  color: #0369a1;
}

.status-chip-shipped {
  background: #ede9fe;
  color: #6d28d9;
}

.status-chip-delivered {
  background: #dcfce7;
  color: #15803d;
}

.status-chip-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

/* Order Cards List */
.profile-order-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-order-card {
  display: block;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  padding: 0.85rem 1rem;
  transition: all 0.15s ease;
  color: var(--dark, #111111);
}

.profile-order-card:hover {
  border-color: var(--primary, #d90429);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.profile-order-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.profile-order-card-no {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--dark, #111111);
}

.profile-order-card-middle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--color-gray-500, #6b7280);
  margin-bottom: 0.45rem;
}

.profile-order-card-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.profile-order-card-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px dashed var(--border, #e5e7eb);
  padding-top: 0.45rem;
}

.profile-order-total-label {
  font-size: 0.82rem;
  color: var(--color-gray-600, #4b5563);
}

.profile-order-card-total {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary, #d90429);
}

/* Empty State */
.profile-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
}

.profile-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-gray-100, #f3f4f6);
  color: var(--color-gray-400, #9ca3af);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.profile-empty-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark, #111111);
  margin: 0 0 0.5rem;
}

.profile-empty-desc {
  font-size: 0.88rem;
  color: var(--color-gray-500, #6b7280);
  max-width: 420px;
  margin: 0 auto 1.25rem;
  line-height: 1.45;
}

.profile-shop-btn {
  font-weight: 700;
  padding: 0.65rem 1.5rem;
}

/* Pagination */
.profile-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.profile-page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 0.5rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border, #e5e7eb);
  background: #ffffff;
  color: var(--dark, #111111);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.profile-page-btn:hover {
  background: var(--color-gray-100, #f3f4f6);
  border-color: var(--color-gray-300, #d1d5db);
}

.profile-page-btn.profile-page-active {
  background: var(--primary, #d90429);
  color: #ffffff;
  border-color: var(--primary, #d90429);
}

.profile-page-numbers {
  display: flex;
  gap: 0.35rem;
}

/* Order View Details */
.profile-order-view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.profile-order-subline {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-gray-500, #6b7280);
}

.profile-order-main-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--dark, #111111);
  margin: 2px 0 4px;
}

.profile-order-timestamp {
  font-size: 0.85rem;
  color: var(--color-gray-500, #6b7280);
  margin: 0;
}

/* Timeline */
.profile-timeline-wrap {
  margin-top: 1.5rem;
}

.profile-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .profile-timeline {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.profile-timeline-step {
  display: flex;
  flex-direction: column;
}

@media (max-width: 640px) {
  .profile-timeline-step {
    flex-direction: row;
    gap: 1rem;
  }
}

.timeline-step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  position: relative;
}

@media (max-width: 640px) {
  .timeline-step-indicator {
    flex-direction: column;
    margin-bottom: 0;
  }
}

.timeline-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-gray-200, #e5e7eb);
  color: var(--color-gray-500, #6b7280);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 2;
}

.step-completed .timeline-step-circle {
  background: #16a34a;
  color: #ffffff;
}

.step-current .timeline-step-circle {
  background: var(--primary, #d90429);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(217, 4, 41, 0.2);
}

.timeline-step-line {
  flex: 1;
  height: 3px;
  background: var(--color-gray-200, #e5e7eb);
  margin: 0 4px;
}

@media (max-width: 640px) {
  .timeline-step-line {
    width: 2px;
    height: 30px;
    margin: 4px 0;
  }
}

.step-completed .timeline-step-line {
  background: #16a34a;
}

.timeline-step-content {
  display: flex;
  flex-direction: column;
}

.timeline-step-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark, #111111);
}

.timeline-step-desc {
  font-size: 0.75rem;
  color: var(--color-gray-500, #6b7280);
  line-height: 1.3;
}

.profile-order-cancelled-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md, 8px);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.9rem;
}

.profile-order-cancelled-notice p {
  margin: 2px 0 0;
  font-size: 0.82rem;
}

/* Order Item Rows */
.profile-order-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-item-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.profile-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-item-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border, #e5e7eb);
  overflow: hidden;
  background: #ffffff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.profile-item-placeholder {
  color: var(--color-gray-300, #d1d5db);
}

.profile-item-details {
  flex: 1;
  min-width: 0;
}

.profile-item-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dark, #111111);
  text-decoration: none;
  display: block;
  line-height: 1.35;
}

.profile-item-name:hover {
  color: var(--primary, #d90429);
}

.profile-item-meta {
  display: flex;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--color-gray-500, #6b7280);
  margin-top: 2px;
}

.profile-item-price {
  font-weight: 600;
  color: var(--dark, #111111);
}

.profile-item-subtotal {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark, #111111);
  white-space: nowrap;
}

/* Order Summary Box */
.profile-order-summary-box {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1.5px dashed var(--border, #e5e7eb);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--color-gray-600, #4b5563);
}

.summary-total-line {
  font-size: 1.1rem;
  color: var(--dark, #111111);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

.summary-total-amt {
  color: var(--primary, #d90429);
  font-size: 1.2rem;
}

.profile-cod-badge {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}

/* Extra Info Grid */
.profile-order-extra-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .profile-order-extra-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.profile-info-mini-body {
  font-size: 0.88rem;
  color: var(--color-gray-700, #374151);
  line-height: 1.5;
}

.profile-recipient-name {
  margin: 0 0 4px;
}

.profile-recipient-phone,
.profile-recipient-address {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 4px 0;
  color: var(--color-gray-600, #4b5563);
}

.profile-recipient-phone svg,
.profile-recipient-address svg {
  margin-top: 3px;
  flex-shrink: 0;
}

.profile-order-note {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-gray-50, #f9fafb);
  border-radius: var(--radius-md, 8px);
  border-left: 3px solid var(--primary, #d90429);
}

.profile-support-text {
  font-size: 0.85rem;
  color: var(--color-gray-500, #6b7280);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.profile-support-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-support-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  border-radius: var(--radius-md, 8px);
}

/* Track Order Support Channels Action Cards */
.track-support-action-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.track-support-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg, 12px);
  text-decoration: none;
  background: #ffffff;
  border: 1.5px solid var(--border, #e5e7eb);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.track-support-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.track-support-btn:active {
  transform: translateY(0) scale(0.99);
}

.track-btn-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.track-btn-text-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.track-btn-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark, #111111);
  transition: color 0.15s ease;
}

.track-btn-subtitle {
  font-size: 0.76rem;
  color: var(--color-gray-500, #6b7280);
  margin-top: 2px;
  transition: color 0.15s ease;
}

.track-btn-arrow {
  color: var(--color-gray-400, #9ca3af);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.15s ease;
}

.track-support-btn:hover .track-btn-arrow {
  transform: translateX(3px);
}

/* Call Support Theme */
.track-btn-call {
  border-color: rgba(217, 4, 41, 0.2);
  background: rgba(217, 4, 41, 0.02);
}

.track-btn-call .track-btn-icon-wrap {
  background: rgba(217, 4, 41, 0.1);
  color: var(--primary, #d90429);
}

.track-btn-call:hover {
  background: linear-gradient(135deg, #d90429 0%, #b8001f 100%);
  border-color: #b8001f;
  box-shadow: 0 6px 18px rgba(217, 4, 41, 0.25);
}

.track-btn-call:hover .track-btn-title,
.track-btn-call:hover .track-btn-subtitle,
.track-btn-call:hover .track-btn-arrow {
  color: #ffffff;
}

.track-btn-call:hover .track-btn-icon-wrap {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* WhatsApp Support Theme */
.track-btn-whatsapp {
  border-color: rgba(37, 211, 102, 0.25);
  background: rgba(37, 211, 102, 0.02);
}

.track-btn-whatsapp .track-btn-icon-wrap {
  background: rgba(37, 211, 102, 0.12);
  color: #16a34a;
}

.track-btn-whatsapp:hover {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border-color: #128c7e;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.25);
}

.track-btn-whatsapp:hover .track-btn-title,
.track-btn-whatsapp:hover .track-btn-subtitle,
.track-btn-whatsapp:hover .track-btn-arrow {
  color: #ffffff;
}

.track-btn-whatsapp:hover .track-btn-icon-wrap {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Messenger Inbox Theme */
.track-btn-messenger {
  border-color: rgba(0, 132, 255, 0.25);
  background: rgba(0, 132, 255, 0.02);
}

.track-btn-messenger .track-btn-icon-wrap {
  background: rgba(0, 132, 255, 0.12);
  color: #0084ff;
}

.track-btn-messenger:hover {
  background: linear-gradient(135deg, #0084ff 0%, #a033ff 100%);
  border-color: #0070dc;
  box-shadow: 0 6px 18px rgba(0, 132, 255, 0.25);
}

.track-btn-messenger:hover .track-btn-title,
.track-btn-messenger:hover .track-btn-subtitle,
.track-btn-messenger:hover .track-btn-arrow {
  color: #ffffff;
}

.track-btn-messenger:hover .track-btn-icon-wrap {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Logout Confirmation Modal / Bottom Sheet */
.profile-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.profile-sheet-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.profile-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  z-index: 999;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.22);
  padding-bottom: env(safe-area-inset-bottom);
}

.profile-sheet.is-open {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .profile-sheet {
    top: 50%;
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translate(-50%, -45%) scale(0.95);
    border-radius: var(--radius-lg, 12px);
    width: 90%;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
    padding-bottom: 0;
  }

  .profile-sheet.is-open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
  }
}

.profile-sheet-drag {
  width: 40px;
  height: 4px;
  background: var(--color-gray-300, #d1d5db);
  border-radius: 9999px;
  margin: 10px auto 4px;
}

@media (min-width: 640px) {
  .profile-sheet-drag {
    display: none;
  }
}

.profile-sheet-body {
  padding: 1.25rem 1.5rem 1.5rem;
  text-align: center;
}

.profile-logout-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.profile-sheet-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark, #111111);
  margin: 0 0 0.35rem;
}

.profile-sheet-desc {
  font-size: 0.88rem;
  color: var(--color-gray-500, #6b7280);
  margin: 0 0 1.25rem;
  line-height: 1.4;
}

.profile-sheet-actions {
  display: flex;
  gap: 0.75rem;
}

/* ==========================================================================
   Profile Dashboard Mobile & Tablet Responsive Enhancements
   ========================================================================== */

@media (max-width: 1023px) {
  .profile-page-main {
    padding-top: 1rem;
    padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px));
  }

  /* Hide "Back to Profile" navigation link on mobile/tablet */
  .profile-back-to-profile-wrap {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .profile-page-main {
    padding-top: 0.75rem;
    padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px));
  }

  .profile-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .profile-layout-grid {
    gap: 0.85rem;
  }

  .profile-card {
    padding: 1rem;
    border-radius: 14px;
  }

  /* Profile Hero Card on Mobile */
  .profile-hero-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1.1rem;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .profile-hero-header-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
  }

  .profile-avatar-circle.profile-avatar-lg {
    width: 52px;
    height: 52px;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.25);
  }

  .profile-hero-info {
    min-width: 0;
    flex: 1;
  }

  .profile-hero-badge {
    font-size: 0.68rem;
    padding: 2px 7px;
    margin-bottom: 3px;
  }

  .profile-hero-name {
    font-size: 1.12rem;
    line-height: 1.25;
    word-break: break-word;
  }

  .profile-hero-phone {
    font-size: 0.84rem;
    margin-top: 1px;
    color: var(--color-gray-600, #4b5563);
  }

  .profile-hero-address {
    font-size: 0.78rem;
    margin-top: 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .profile-hero-action {
    width: 100%;
    margin-left: 0;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--border, #e5e7eb);
  }

  .profile-edit-btn {
    width: 100%;
    justify-content: center;
    padding: 0.52rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 8px;
    background: #ffffff;
  }

  /* Quick Stats Strip on Mobile */
  .profile-stats-strip {
    gap: 0.45rem;
    margin-top: 0.75rem;
  }

  .profile-stat-box {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding: 0.75rem 0.25rem;
    gap: 0.3rem;
    border-radius: 12px;
  }

  .profile-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .profile-stat-icon svg {
    width: 17px;
    height: 17px;
  }

  .profile-stat-num {
    font-size: 1.15rem;
  }

  .profile-stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.2px;
    margin-top: 1px;
  }

  /* Mobile Nav Menu on Mobile */
  .profile-mobile-nav-block {
    margin-top: 0.85rem;
  }

  .profile-section-title {
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.45rem;
  }

  .profile-menu-list {
    border-radius: 12px;
  }

  .profile-menu-row {
    min-height: 52px;
    height: 52px;
    padding: 0 0.85rem;
    font-size: 0.92rem;
    gap: 0.75rem;
  }

  .profile-menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
  }

  .profile-menu-icon svg {
    width: 17px;
    height: 17px;
  }

  .profile-menu-label {
    font-size: 0.9rem;
    font-weight: 600;
  }

  .profile-menu-badge {
    font-size: 0.7rem;
    padding: 2px 7px;
  }

  /* Recent Orders on Mobile */
  .profile-recent-orders-card {
    margin-top: 0.85rem;
    padding: 1rem;
    border-radius: 14px;
  }

  .profile-card-header {
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .profile-card-title {
    font-size: 1.05rem;
  }

  .profile-card-subtitle {
    font-size: 0.76rem;
  }

  .profile-view-all-link {
    font-size: 0.8rem;
  }

  .profile-order-cards-list {
    gap: 0.6rem;
  }

  .profile-order-card {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
  }

  .profile-order-card-no {
    font-size: 0.86rem;
  }

  .profile-status-chip {
    font-size: 0.7rem;
    padding: 2px 7px;
  }

  .profile-order-card-date {
    font-size: 0.75rem;
  }

  .profile-order-card-items {
    font-size: 0.75rem;
  }

  .profile-order-card-total {
    font-size: 0.95rem;
  }
}

@media (max-width: 360px) {
  .profile-container {
    padding-left: 8px;
    padding-right: 8px;
  }

  .profile-card {
    padding: 0.85rem 0.75rem;
  }

  .profile-stat-box {
    padding: 0.65rem 0.15rem;
  }

  .profile-stat-num {
    font-size: 1.05rem;
  }

  .profile-stat-label {
    font-size: 0.6rem;
  }

  .profile-menu-row {
    padding: 0 0.65rem;
    gap: 0.6rem;
  }
}

.profile-view-orders-wrap {
  text-align: center;
  margin-top: 1.25rem;
}

.profile-view-orders-btn {
  width: 100%;
  max-width: 260px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md, 8px);
}

@media (max-width: 640px) {
  .profile-view-orders-wrap {
    margin-top: 1rem;
  }

  .profile-view-orders-btn {
    max-width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
  }
}