/* 
  Tiendita.PE - Premium Shadcn UI Inspired SaaS Web & Tech CSS Design System
  Author: Antigravity Design Expert AI
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* HSL curated palette - Emerald Accent on crisp Shadcn Slate/Zinc canvas */
  --primary-rgb: 37, 211, 102; /* WhatsApp Brand Green */
  --accent-rgb: 244, 244, 245;  /* Zinc Light accent */
  
  /* Brand Primary Highlight */
  --primary: hsl(142, 72%, 29%);
  --primary-hover: hsl(142, 72%, 24%);
  --primary-light: hsla(142, 72%, 29%, 0.1);
  
  --accent: hsl(240, 5.9%, 10%);
  --accent-hover: hsl(240, 5.9%, 15%);
  --accent-light: hsl(240, 4.8%, 95.9%);

  --success: hsl(142, 76%, 36%);
  --warning: hsl(38, 92%, 50%);
  --danger: hsl(346, 84%, 50%);
  
  /* Gradients - Subtle, non-intrusive premium flows */
  --grad-primary: linear-gradient(135deg, hsl(142, 72%, 29%) 0%, hsl(142, 76%, 36%) 100%);
  --grad-hover: linear-gradient(135deg, hsl(142, 72%, 24%) 0%, hsl(142, 76%, 30%) 100%);
  --grad-premium: linear-gradient(135deg, hsl(240, 5.9%, 10%) 0%, hsl(240, 5.9%, 20%) 100%);
  --grad-dark: linear-gradient(180deg, hsl(240, 10%, 3.9%) 0%, hsl(240, 10%, 6%) 100%);
  --grad-card-glow: radial-gradient(circle at top left, hsla(142, 72%, 29%, 0.04), transparent 60%);

  /* Default Dark Mode (Crisp Shadcn Zinc style) */
  --bg-app: hsl(240, 10%, 3.9%);
  --bg-card: hsl(240, 10%, 3.9%);
  --text-main: hsl(0, 0%, 98%);
  --text-muted: hsl(240, 5%, 64.9%);
  --border-color: hsl(240, 3.7%, 15.9%);
  
  --glass-bg: rgba(9, 9, 11, 0.85);
  --glass-border: hsl(240, 3.7%, 15.9%);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 15px hsla(142, 72%, 29%, 0.15);
  
  /* Shadcn standard geometric border radii (crisp and sharp) */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  
  --font-main: 'Inter', 'Plus Jakarta Sans', sans-serif;
  --nav-height: 64px;
}

/* Light Theme overrides for pure corporate clean catalog feel */
[data-theme="light"] {
  --bg-app: hsl(0, 0%, 100%);
  --bg-card: hsl(0, 0%, 100%);
  --text-main: hsl(240, 10%, 3.9%);
  --text-muted: hsl(240, 3.8%, 46.1%);
  --border-color: hsl(240, 5.9%, 90%);
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: hsl(240, 5.9%, 90%);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 15px hsla(142, 72%, 29%, 0.08);
  --grad-dark: linear-gradient(180deg, hsl(0, 0%, 100%) 0%, hsl(240, 4.8%, 97%) 100%);
  
  /* Brand Primary light adjustment */
  --primary: hsl(142, 72%, 29%);
  --primary-hover: hsl(142, 72%, 24%);
  --primary-light: hsla(142, 72%, 29%, 0.08);
}

/* --- Resets & Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-app);
  background-image: var(--grad-dark);
  color: var(--text-main);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  border: none;
  outline: none;
  background: none;
  font-size: 1rem;
}

/* Scrollbar treatments */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Global Layout Elements --- */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Breathtaking Glassmorphic Header Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  transition: all var(--transition-normal);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -1px;
  cursor: pointer;
  color: var(--text-main);
}

.brand i {
  color: var(--primary);
  filter: drop-shadow(0 0 10px hsla(142, 70%, 45%, 0.35));
  font-size: 1.85rem;
}

.brand span {
  color: var(--primary);
  font-weight: 900;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.btn-view-toggle {
  background: var(--grad-primary);
  color: #fff;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 6px 20px hsla(142, 70%, 45%, 0.28);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.btn-view-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px hsla(142, 70%, 45%, 0.45), var(--shadow-glow);
  opacity: 0.95;
}

.btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-circle:hover {
  background: var(--border-color);
  color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
}

/* --- Public Storefront Catalog View --- */
.storefront {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.store-hero {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.store-banner {
  height: 280px;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.store-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 10%, rgba(11, 15, 25, 0.96) 100%);
}

.store-profile {
  display: flex;
  align-items: flex-end;
  padding: 0 3rem 2.5rem;
  margin-top: -90px;
  position: relative;
  z-index: 10;
  gap: 2rem;
  flex-wrap: wrap;
}

.store-logo {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-sm);
  border: 4px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  overflow: hidden;
}

.store-info {
  flex: 1;
  padding-bottom: 0.5rem;
  min-width: 280px;
}

.store-name-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.store-name {
  font-size: 2.65rem;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: #fff;
}

.badge-open {
  background: var(--success);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.35rem 0.9rem;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}

.store-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.75rem;
  line-height: 1.6;
  max-width: 800px;
}

.store-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  color: #fff;
  font-size: 1.15rem;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--grad-primary);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* Catalog sticky filter bar */
.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  position: sticky;
  top: var(--nav-height);
  background: var(--bg-app);
  padding: 1rem 0;
  z-index: 90;
  border-bottom: 1px solid var(--border-color);
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 1.1rem 1rem 1.1rem 3.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-glow);
}

.search-icon {
  position: absolute;
  left: 1.35rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.25rem;
  pointer-events: none;
}

.categories-container {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.25rem 0;
  scrollbar-width: none;
}

.categories-container::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.category-pill:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.category-pill.active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px hsla(142, 70%, 45%, 0.35), var(--shadow-glow);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 2.25rem;
}

/* Premium Footprint Product Card */
.product-card {
  background: var(--bg-card);
  background-image: var(--grad-card-glow);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg), 0 10px 40px -10px hsla(142, 70%, 45%, 0.15);
}

.product-image-wrapper {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  background: #1e293b;
  overflow: hidden;
}

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

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

.badge-discount {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--grad-primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  z-index: 10;
  box-shadow: 0 4px 12px hsla(142, 70%, 45%, 0.35);
}

.badge-out-stock {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--text-main);
  color: var(--bg-app);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  z-index: 10;
}

.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.product-cat {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3.8rem;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: auto;
}

.current-price {
  font-size: 1.55rem;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.original-price {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Card buttons */
.product-btn-add {
  width: 100%;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid transparent;
  padding: 0.95rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.product-card:hover .product-btn-add {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 15px hsla(142, 70%, 45%, 0.25);
}

.card-quantity-selector {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--grad-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 1.25rem;
  height: 48px;
  box-shadow: 0 4px 15px hsla(142, 70%, 45%, 0.25);
}

.card-quantity-btn {
  width: 48px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.45rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  transition: background var(--transition-fast);
}

.card-quantity-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.card-quantity-val {
  font-weight: 800;
  font-size: 1.15rem;
}

/* --- Floating Ribbon Checkout Button --- */
.floating-cart-bar {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(180px);
  z-index: 110;
  width: 90%;
  max-width: 550px;
  background: var(--grad-primary);
  color: #fff;
  padding: 1.2rem 2.2rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 15px 35px hsla(142, 70%, 45%, 0.35), var(--shadow-glow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-cart-bar.active {
  transform: translateX(-50%) translateY(0);
}

.floating-cart-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.floating-cart-count {
  background: #fff;
  color: var(--primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}

.floating-cart-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* --- Checkout Side Panel Drawer --- */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 21, 0.75);
  backdrop-filter: blur(8px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 530px;
  height: 100%;
  background: var(--bg-card);
  z-index: 160;
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 1.45rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.5px;
}

.drawer-title i {
  color: var(--primary);
}

.drawer-close {
  cursor: pointer;
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.drawer-close:hover {
  color: var(--text-main);
  background: var(--border-color);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.empty-cart-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 1.25rem;
}

.empty-cart-icon {
  font-size: 4.5rem;
  color: var(--border-color);
}

/* Cart Items */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.cart-item {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
  width: 80px;
  height: 55px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #1e293b;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cart-item-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.4;
}

.cart-item-variant {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.cart-item-price {
  font-weight: 800;
  color: var(--primary);
  font-size: 0.95rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  background: var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  gap: 0.5rem;
}

.cart-ctrl-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition-fast);
  color: var(--text-main);
}

.cart-ctrl-btn:hover {
  background: var(--bg-card);
  color: var(--primary);
}

.cart-ctrl-val {
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 20px;
  text-align: center;
}

.btn-remove-item {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: color var(--transition-fast);
  padding: 0.5rem;
}

.btn-remove-item:hover {
  color: var(--danger);
}

/* Checkout Form elements */
.checkout-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  border-left: 3px solid var(--primary);
  padding-left: 0.75rem;
  margin-bottom: 0.25rem;
}

.delivery-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.delivery-option {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.delivery-option:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.delivery-option.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.delivery-option i {
  font-size: 1.35rem;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-input {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  width: 100%;
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
}

select.form-input {
  cursor: pointer;
}

/* Receipt Checkout calculations box */
.checkout-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.summary-row.total {
  border-top: 1.5px dashed var(--border-color);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.summary-row.total span:last-child {
  color: var(--primary);
}

.btn-whatsapp-submit {
  width: 100%;
  background: #25D366;
  color: #fff;
  padding: 1.05rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transition: all var(--transition-fast);
  margin-top: 0.5rem;
}

.btn-whatsapp-submit:hover {
  background: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* --- Product Detail Modal Popup --- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 21, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 820px;
  width: 100%;
  overflow: hidden;
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: var(--border-color);
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 768px) {
  .modal-content-grid {
    grid-template-columns: 1fr;
    max-height: 85vh;
    overflow-y: auto;
  }
}

.modal-images-pane {
  position: relative;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1;
}

.modal-img-slider {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-navigation {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 20;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.slider-dot.active {
  background: #fff;
  width: 20px;
  border-radius: 10px;
}

.modal-details-pane {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-content: center;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.variants-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.variant-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.variant-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.variant-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.variant-btn {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-app);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.variant-btn:hover {
  border-color: var(--text-muted);
}

.variant-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.modal-action-row {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.modal-qty-selector {
  display: flex;
  align-items: center;
  background: var(--border-color);
  border-radius: var(--radius-sm);
  height: 48px;
}

.modal-qty-btn {
  width: 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.modal-qty-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.modal-qty-val {
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 30px;
  text-align: center;
}

.modal-btn-submit {
  flex: 1;
  height: 48px;
  background: var(--grad-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px hsla(142, 70%, 45%, 0.25);
  transition: all var(--transition-fast);
}

.modal-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px hsla(142, 70%, 45%, 0.4);
}

/* --- Administrative Layout & Merchant Sidebar --- */
.admin-view {
  flex: 1;
  display: flex;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.admin-sidebar {
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: fit-content;
  box-shadow: var(--shadow-sm);
}

.admin-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.admin-tab-btn:hover {
  background: var(--border-color);
  color: var(--text-main);
}

.admin-tab-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

.admin-tab-btn i {
  font-size: 1.15rem;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-section-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.admin-modal {
  max-width: 520px;
  width: 100%;
}

.admin-modal-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Custom visual list styles */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  text-align: left;
}

.admin-table th {
  padding: 1rem;
  border-bottom: 2px solid var(--border-color);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.admin-table tr:hover td {
  background: var(--border-color);
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-0.5px);
  box-shadow: 0 4px 12px hsla(142, 72%, 29%, 0.2);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--border-color);
}

/* Badge tags */
.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tag-badge.badge-new {
  background: hsla(243, 75%, 65%, 0.15);
  color: hsl(243, 75%, 65%);
}

.tag-badge.badge-confirmed {
  background: hsla(142, 70%, 45%, 0.15);
  color: var(--primary);
}

.tag-badge.badge-delivered {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.tag-badge.badge-cancelled {
  background: hsla(350, 89%, 60%, 0.15);
  color: var(--danger);
}

/* Responsive grid breaks */
@media (max-width: 992px) {
  .navbar {
    padding: 0 2rem;
  }
  .admin-view {
    flex-direction: column;
    gap: 2rem;
  }
  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem;
  }
  .admin-tab-btn {
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
  }
}

@media (max-width: 576px) {
  .navbar {
    padding: 0 1.25rem;
  }
  .brand {
    font-size: 1.35rem;
  }
  .storefront {
    padding: 1.5rem 1rem;
  }
  .store-profile {
    padding: 0 1.5rem 1.5rem;
    margin-top: -60px;
    gap: 1rem;
  }
  .store-logo {
    width: 110px;
    height: 110px;
  }
  .store-name {
    font-size: 1.95rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .floating-cart-bar {
    bottom: 1.5rem;
    padding: 1rem 1.5rem;
  }
}

/* --- Ultra-Premium Floating Toast Notifications --- */
.planto-toast {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  box-shadow: var(--shadow-lg), 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: translateX(120%) scale(0.9);
  opacity: 0;
  pointer-events: auto;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  font-family: var(--font-main);
}

.planto-toast.active {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.planto-toast.success {
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-lg), 0 10px 40px rgba(37, 211, 102, 0.1);
}

.planto-toast.error {
  border-left: 4px solid var(--danger);
  box-shadow: var(--shadow-lg), 0 10px 40px rgba(239, 68, 68, 0.1);
}

.planto-toast.info {
  border-left: 4px solid #3b82f6;
  box-shadow: var(--shadow-lg), 0 10px 40px rgba(59, 130, 246, 0.1);
}

.planto-toast.heart {
  border-left: 4px solid #ef4444;
  box-shadow: var(--shadow-lg), 0 10px 40px rgba(239, 68, 68, 0.15);
}

.planto-toast.coupon {
  border-left: 4px solid #eab308;
  box-shadow: var(--shadow-lg), 0 10px 40px rgba(234, 179, 8, 0.15);
}

/* --- Interactive Options Grid (Checkout Drawer) --- */
.delivery-option-btn {
  padding: 0.95rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-muted) !important;
}

.delivery-option-btn:hover {
  border-color: var(--text-muted) !important;
  color: var(--text-main) !important;
}

.delivery-option-btn.active {
  background: var(--primary-light) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  box-shadow: var(--shadow-glow);
}

.pay-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-muted) !important;
}

.pay-option-card:hover {
  border-color: var(--text-muted) !important;
  color: var(--text-main) !important;
}

.pay-option-card.active {
  background: var(--primary-light) !important;
  border-color: var(--primary) !important;
  color: var(--text-main) !important;
  box-shadow: var(--shadow-glow);
}

.pay-option-card.active i:not(.pay-check) {
  color: var(--primary) !important;
}

.pay-option-card.active .pay-check {
  color: var(--primary) !important;
  display: block !important;
}

.pay-option-card .pay-check {
  display: none;
}

/* --- Tip Selector Pills (Checkout Drawer) --- */
.tip-pill {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color) !important;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  background: var(--bg-card) !important;
  color: var(--text-muted) !important;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tip-pill:hover {
  border-color: var(--text-muted) !important;
  color: var(--text-main) !important;
}

.tip-pill.active {
  background: var(--primary-light) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  box-shadow: var(--shadow-glow);
}

/* ========================================== */
/*   NATIVE MOBILE APP & HIGH-FIDELITY LAYOUTS */
/* ========================================== */

/* 1. iOS/Android Safe Area Support */
.safe-padding-bottom {
  padding-bottom: calc(env(safe-area-inset-bottom) + 16px) !important;
}

.safe-padding-top {
  padding-top: calc(env(safe-area-inset-top) + 16px) !important;
}

/* 2. Micro-scale Haptic Feel on Interactive Elements */
.active-tap,
.btn-primary:active,
.btn-secondary:active,
.btn-view-toggle:active,
.nav-login-btn:active,
.category-pill:active,
.bottom-nav-btn:active,
.product-card:active,
.app-product-card:active,
.detail-buy-btn:active,
.circle-btn:active,
.variant-pill:active {
  transform: scale(0.97) !important;
  transition: transform 0.08s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 3. Android Ripple / Tap Feedback Indicator */
.tap-highlight-none {
  -webkit-tap-highlight-color: transparent;
}

/* 4. Native iOS/Android style Bottom Sheets for Mobile */
@media (max-width: 768px) {
  /* Dynamic Island/Notch adjustment for headers */
  .navbar, .app-header {
    padding-top: calc(env(safe-area-inset-top) + 12px) !important;
    height: auto !important;
    min-height: 64px;
  }

  /* Sticky Bottom Nav PWA iOS integration */
  .app-bottom-nav {
    height: calc(72px + env(safe-area-inset-bottom)) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    background: var(--glass-bg) !important;
    border-top: 1px solid var(--glass-border) !important;
  }

  /* Refit normal modals to slide from bottom on Mobile */
  .modal-backdrop, .planto-detail-overlay {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .modal-container, .planto-detail-modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    margin: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    transform: translateY(100%) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    max-height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .modal-container {
    height: auto !important;
  }

  .planto-detail-modal {
    height: 85vh !important;
  }

  .modal-backdrop.active .modal-container,
  .modal-backdrop.show .modal-container,
  .planto-detail-overlay.active .planto-detail-modal {
    transform: translateY(0) !important;
  }

  /* Drawer Sheets sliding from right (e.g. cart drawer) - refit to bottom sheets in mobile */
  .drawer {
    top: auto !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 85vh !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    border-left: none !important;
    border-top: 1px solid var(--border-color) !important;
    transform: translateY(100%) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .drawer.active {
    transform: translateY(0) !important;
  }

  /* Drag Indicator Handle for native feel */
  .bottom-sheet-drag-handle {
    display: block !important;
    width: 40px;
    height: 5px;
    background: var(--border-color);
    border-radius: 999px;
    margin: 10px auto 5px;
    opacity: 0.8;
  }
}

@media (min-width: 769px) {
  .bottom-sheet-drag-handle {
    display: none !important;
  }
}

/* 5. Fluid responsive grid refinements for ultra desktop look */
@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 1.5rem !important;
  }
  .product-card {
    border-radius: var(--radius-md) !important;
  }
  .product-image-wrapper {
    aspect-ratio: 1 / 1 !important; /* Square products like high-end retail */
  }
}

/* PWA iOS Modal styles */

/* iOS Install Guide Modal */
.ios-install-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ios-install-modal.active {
  visibility: visible;
  opacity: 1;
}

.ios-install-modal-content {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 24px 24px 0 0;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  position: relative;
  color: #1f2937;
}

.ios-install-modal.active .ios-install-modal-content {
  transform: translateY(0);
}

.ios-install-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f3f4f6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4b5563;
  font-weight: bold;
}


