/* Store.Codesaif Design System & Native Mobile App Stylesheet */

:root {
  --primary-color: #4F46E5;
  --primary-hover: #4338CA;
  --secondary-color: #7C3AED;
  --accent-color: #0EA5E9;
  --success-color: #10B981;
  --warning-color: #F59E0B;
  --danger-color: #EF4444;
  --text-main: #0F172A;
  --text-secondary: #64748B;
  --border-color: #E2E8F0;
  --bg-main: #F8FAFC;
  --card-bg: #FFFFFF;
  --radius: 12px;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Header Navbar */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.brand-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* Input Controls & Groups */
.form-control, .form-select, .input-group-text {
  border-color: var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.input-group .form-control:focus {
  z-index: 3;
}

.input-group-text {
  background-color: #F1F5F9;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  border-radius: 8px;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 8px;
}

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

/* Cards & Containers */
.card-custom {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

/* App-Like Horizontal Scrolling Category Chips (Single-Line, Touch-Friendly, No-Wrap) */
.category-scroll-wrapper {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 4px 2px 12px 2px;
  margin-bottom: 1.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.category-scroll-wrapper::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Brave */
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap !important;
  text-decoration: none !important;
  background-color: #FFFFFF;
  color: #334155;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
  flex-shrink: 0;
  height: 42px;
}

.category-chip i {
  font-size: 1.1rem;
}

.category-chip:hover {
  background-color: #EEF2FF;
  color: #4F46E5 !important;
  border-color: #C7D2FE;
}

.category-chip.active {
  background-color: #4F46E5 !important;
  color: #FFFFFF !important;
  border-color: #4F46E5 !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35) !important;
}

.category-chip.active i {
  color: #FFFFFF !important;
}

/* Product Card Typography & Layout */
.product-img-wrapper {
  background: #F1F5F9;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrapper img, .product-img-wrapper svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-body {
  padding: 1.25rem;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.product-title a {
  color: #0F172A !important;
  text-decoration: none !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.product-title a:hover {
  color: #4F46E5 !important;
}

.product-desc {
  color: #64748B;
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.price-display {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.price-original {
  color: #94A3B8;
  text-decoration: line-through;
  font-size: 0.85rem;
  font-weight: 500;
}

.badge-custom {
  background-color: #EEF2FF;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  display: inline-block;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: #EEF2FF;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating Circular WhatsApp Icon Button */
.whatsapp-float {
  position: fixed;
  width: 52px;
  height: 52px;
  bottom: 20px;
  right: 20px;
  background-color: #25D366;
  border-radius: 50%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  color: #ffffff !important;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none !important;
  outline: none !important;
}

.whatsapp-float:hover, .whatsapp-float:focus, .whatsapp-float:active {
  text-decoration: none !important;
  color: #ffffff !important;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5) !important;
}

/* Mobile App Native Bottom Navigation & App Layout Rules */
@media (max-width: 767.98px) {
  body {
    padding-bottom: 72px !important; /* Space for bottom nav */
  }

  .whatsapp-float {
    width: 46px;
    height: 46px;
    bottom: 74px !important; /* Positioned above bottom nav */
    right: 16px;
    font-size: 22px;
    z-index: 1030;
  }

  /* Fixed Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1040;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748B;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none !important;
    flex: 1;
    height: 100%;
    position: relative;
    transition: color 0.15s ease;
  }

  .mobile-bottom-nav .nav-item.active {
    color: #4F46E5 !important;
  }

  .mobile-bottom-nav .nav-item i {
    font-size: 1.3rem;
    line-height: 1;
    margin-bottom: 2px;
  }

  .mobile-bottom-nav .cart-badge {
    position: absolute;
    top: 6px;
    right: 28%;
    font-size: 0.65rem;
    padding: 0.2em 0.45em;
  }

  /* Mobile Sticky Product Purchase Bar */
  .mobile-sticky-purchase-bar {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 1035;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    padding: 10px 16px;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
  }

  .site-header {
    padding: 0.25rem 0;
  }
  .card-custom {
    padding: 1rem !important;
  }
  .btn-lg {
    font-size: 1rem;
    padding: 0.65rem 1rem;
  }
}
