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

:root {
  --primary: #1d7cf9;
  --primary-light: #3B82F6;
  --secondary: #FFB800;
  /* Golden */
  --secondary-light: #FCD34D;
  --bg-light: #f0f4f9;
  --bg-white: #FFFFFF;
  --text-dark: #1A202C;
  --text-gray: #4A5568;
  --text-light: #A0AEC0;
  --border: #E2E8F0;
  --container-max: 1200px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08), 0 10px 15px rgba(0, 0, 0, 0.04);
  --card-bg: #f8faff;
  --card-border: rgba(29, 124, 249, 0.08);
  --glass: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.3);
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 8px;
}

/* Layout Utilities */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 740px) {
  .container {
    padding: 0 16px;
  }
}

.section-padding {
  padding: 100px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }
}

/* Colors & Text */
.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.text-gray {
  color: var(--text-gray);
}

.text-center {
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  gap: 10px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 74, 173, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 20px 25px -5px rgba(0, 74, 173, 0.4);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--text-dark);
  box-shadow: 0 10px 15px -3px rgba(255, 184, 0, 0.3);
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
  transform: translateY(-3px);
  box-shadow: 0 20px 25px -5px rgba(255, 184, 0, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-3px);
}

/* Glassmorphism Styles */
.glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.card {
  background: var(--card-bg);
  border-radius: 28px;
  padding: 40px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
}

.card:hover {
  background: #ffffff;
  transform: translateY(-12px);
  box-shadow: 0 30px 60px rgba(29, 124, 249, 0.12);
  border-color: var(--primary);
}

/* Feature Icon Styling */
.icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  transition: var(--transition);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.card:hover .icon-wrap {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 24px rgba(29, 124, 249, 0.2);
}

.bg-primary-light {
  background-color: var(--primary-light) !important;
}

.bg-secondary {
  background-color: var(--secondary) !important;
}

/* Header */
header {
  position: fixed !important;
  top: 0 !important;
  margin-top: 0 !important;
  width: 100%;
  z-index: 9999;
  padding: 0;
  transition: var(--transition);
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

header.scrolled {
  box-shadow: var(--shadow);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  transition: var(--transition);
}

header.scrolled .nav-content {
  padding: 10px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 44px;
  border-radius: 50%;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text h1 {
  font-size: 1.4rem;
  color: var(--primary);
  margin: 0;
}

.logo-text span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  font-weight: 700;
}

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

.mobile-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 1024px) {

  .nav-links {
    display: none !important;
    flex-direction: column;
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    width: 85% !important; /* Premium slide-out look */
    max-width: 320px;
    height: 100vh !important;
    background: #ffffff !important;
    padding: 30px 24px;
    z-index: 50000 !important;
    gap: 0;
    text-align: left;
    box-shadow: 20px 0 60px rgba(0,0,0,0.15);
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Add a "Menu" header to the drawer */
  .nav-links::before {
    content: 'Navigation';
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #94a3b8;
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
  }

  .nav-links.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: menuSlideInMobile 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  }

  @keyframes menuSlideInMobile {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
  }

  .nav-links a, 
  .nav-mega-trigger {
    font-size: 1.05rem !important;
    padding: 16px 0 !important;
    border-bottom: 1px solid #f8fafc !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    font-weight: 600 !important;
    transition: color 0.2s;
    text-decoration: none;
    width: 100% !important;
  }

  .nav-links a:active {
    color: var(--primary) !important;
    background: #fff1f2;
    padding-left: 10px !important;
  }

  /* Fix the Products chevron in mobile */
  .mega-chevron {
    margin-left: auto !important;
    opacity: 0.5;
  }

  .header-cta .btn {
    display: none;
  }

  .nav-cart-btn {
    display: none !important;
  }

  .mobile-toggle {
    display: block !important;
    position: relative;
    z-index: 50001 !important;
    background: #f8fafc;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
}

@keyframes menuSlideIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Floating Actions */
.floating-actions {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.float-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

@keyframes floatPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.float-btn.whatsapp {
  background-color: #25D366;
  animation: floatPulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

.float-btn.whatsapp:hover {
  animation: none;
  background-color: #1ebc59;
}

.float-btn.call {
  background-color: var(--primary);
}

.float-btn:hover {
  transform: scale(1.15) rotate(5deg);
}

/* Brand Bar / Tags */
.brand-bar {
  background: var(--primary);
  color: white;
  padding: 15px 0;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 2px solid var(--secondary);
}

.brand-bar-content {
  display: flex;
  animation: marquee 40s linear infinite;
  width: max-content;
}

.brand-bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 40px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Footer Styles */
footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 80px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2.2fr auto;
  gap: 30px;
  margin-bottom: 50px;
}

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

@media (max-width: 500px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

footer h4 {
  font-size: 1.2rem;
  margin-bottom: 24px;
}

footer ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

footer li {
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

footer li svg {
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Modern Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .section-title { font-size: 2rem; }
}

/* Testimonials */
.testimonial {
    text-align: left !important;
    padding: 35px !important;
}

.testimonial .rating {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    color: var(--secondary);
    font-weight: 800;
    font-size: 0.9rem;
}

.testimonial p {
    font-style: italic;
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 28px;
}

.testimonial .user {
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
}

.testimonial .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(29, 124, 249, 0.2);
}

.testimonial .user span {
    font-weight: 700;
    color: var(--text-dark);
}

/* Product Cards */
.product-card.card {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.prod-img {
    background: #fff;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 240px;
    border-bottom: 1px solid var(--card-border);
    position: relative;
}

.prod-img img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .prod-img img {
    transform: scale(1.1) rotate(-2deg);
}

.prod-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.4;
}

.cat-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(29, 124, 249, 0.06);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.prod-price {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 15px 0 5px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    letter-spacing: -0.5px;
}

.prod-price .currency {
    font-size: 0.85rem;
    color: #dc2626; /* Matching the brand's primary red */
    font-weight: 800;
    letter-spacing: 0.5px;
}

@media (max-width: 991px) {

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

@media (max-width: 767px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   MEGA MENU — Products Navigation Dropdown
   ============================================= */

/* Crucial: Header must be relative for the full-width absolute menu */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  transition: all 0.3s ease;
}

.nav-mega-wrapper {
  position: static; /* Restored to static so the menu covers the full screen width */
}

/* Trigger: styled identically to other nav links */
.nav-mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
  padding: 0;
}

.nav-mega-trigger:hover,
.nav-mega-wrapper.mega-open .nav-mega-trigger,
.nav-mega-trigger.active {
  color: var(--primary);
}

/* Animated chevron */
.mega-chevron {
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-top: 1px;
}

.nav-mega-wrapper.mega-open .mega-chevron {
  transform: rotate(180deg);
}

/* ── Mega Menu Panel ── */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 4px solid var(--primary);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.12);
  z-index: 998;
  padding: 40px 0 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-mega-wrapper.mega-open .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* 5-column grid matching the image */
.mega-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
  margin-bottom: 40px;
  padding: 0;
}

.mega-grid .container {
    width: 100%;
}

.mega-col-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.mega-col-title {
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000000;
}

.mega-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mega-links li a {
  font-size: 0.95rem;
  color: var(--text-gray);
  font-weight: 500;
  transition: color 0.2s;
}

.mega-links li a:hover {
  color: var(--primary);
}

/* Blue "VIEW ALL" links */
.mega-all-link {
    margin-top: 8px;
}

.mega-all-link a {
  color: var(--primary) !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-top: 4px;
}

.mega-all-link a:hover {
    text-decoration: underline;
}

/* ── Mega Menu Footer Bar ── */
.mega-footer-bar {
  background: #f8faff;
  border-top: 1px solid #edf2f7;
  padding: 24px 0;
  margin-top: 0;
}

.mega-footer-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mega-footer-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mega-shop-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    border-radius: 12px;
}

/* Mobile Adjustments for Mega Menu */
@media (max-width: 1024px) {
  .mega-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: #fcfdfe;
    transition: none;
  }
  
  .nav-mega-wrapper.mega-open .mega-menu {
    display: block;
  }

  .mega-grid {
    grid-template-columns: repeat(1, 1fr); /* Single column for better mobile flow */
    gap: 10px;
    margin-bottom: 0;
    padding: 15px 10px;
  }

  .mega-col {
    border-bottom: 1px solid #f1f5f9;
    padding: 15px 0;
  }

  .mega-col:last-child {
    border-bottom: none;
  }

  .mega-col-header {
    border-bottom: none;
    margin-bottom: 10px;
    padding-bottom: 0;
  }

  .mega-footer-bar {
    padding: 30px 15px;
  }

  .mega-footer-bar .container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

/* Icon Box Styling (used in services, about & contact) */
.icon-box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.card:hover .icon-box {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 20px rgba(29, 124, 249, 0.15);
}

/* Service Cards */
.service-card {
    text-align: left;
}

.service-card h3 {
    margin-bottom: 16px;
}

.card-img img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    transition: var(--transition);
}

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

/* Mission Cards */
.card.mission {
    padding: 40px !important;
}

/* Values & Items */
.value-item {
    padding: 30px;
    transition: var(--transition);
}

.value-item:hover {
    transform: translateY(-5px);
}

.value-item i {
    transition: var(--transition);
}

.value-item:hover i {
    transform: scale(1.2);
    color: var(--secondary);
}


/* =============================================
   SHARE FEATURE & TOAST NOTIFICATIONS
   ============================================= */

/* Floating Share Button on Cards */
.share-btn-card {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.share-btn-card:hover {
    background: #fff;
    color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,74,173,0.15);
    border-color: var(--primary);
}
.share-btn-card svg {
    width: 18px;
    height: 18px;
}

/* Detail Page Share Button */
.btn-share-detail {
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}
.btn-share-detail:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: #1e293b;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: toastIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
               toastOut 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) 2.5s forwards;
}
.toast-success-icon {
    color: #22c55e;
    font-size: 1.1rem;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

@media (max-width: 600px) {
    .toast {
        width: 90vw;
        max-width: 320px;
    }
}

/* ========================================================================= */
/*                              CART SYSTEM                                  */
/* ========================================================================= */

.nav-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    margin-right: 8px;
    color: var(--text-dark);
    text-decoration: none;
    transition: transform 0.2s, color 0.2s;
    cursor: pointer;
}
.nav-cart-btn:hover {
    color: var(--primary);
    transform: scale(1.05);
}
.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc2626;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 50px;
    border: 2px solid white;
    pointer-events: none;
    display: none; /* hidden by default if 0 */
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 22, 40, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -45%) scale(0.95);
    width: 95%;
    max-width: 480px;
    max-height: 85vh;
    background: white;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}
.cart-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}
.cart-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.cart-header {
    padding: 24px 28px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cart-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dark);
}
.cart-close-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    color: #64748b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-close-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecdd3;
    transform: rotate(90deg);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cart-empty {
    text-align: center;
    color: #888;
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}
.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}
.cart-item-price {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
}
.cart-item-price-info {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-weight: 500;
}
.item-unit-price {
    color: var(--primary);
    font-weight: 700;
}
.cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.qty-controls {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    height: 40px;
    padding: 2px;
}
.qty-btn {
    background: white;
    border: 1px solid #f1f5f9;
    width: 36px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    transition: all 0.2s ease;
    border-radius: 6px;
}
.qty-btn:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}
.qty-val {
    font-size: 1rem;
    font-weight: 800;
    width: 44px;
    text-align: center;
    color: var(--text-dark);
}
.cart-item-remove {
    background: #fff5f5;
    border: 1px solid #fee2e2;
    color: #ef4444;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.cart-item-remove:hover {
    background: #fee2e2;
    transform: scale(1.1);
    color: #dc2626;
}

.cart-footer {
    padding: 24px 28px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-gray);
}
.cart-total-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
}
.cart-checkout-btn {
    width: 100%;
    border-radius: 12px;
    padding: 16px;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(29, 124, 249, 0.25);
}
/* Split Card Footer Styles */
.card-footer-actions {
    display: flex;
    gap: 8px;
    align-items: stretch; /* Make them same height */
    width: 100%;
}
.btn-view-black {
    flex: 1;
    background-color: #c72027 !important;
    color: white !important;
    text-align: center;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-view-black:hover {
    background-color: #a0171d !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(199, 32, 39, 0.3);
}

.btn-add-cart-green {
    background-color: #22c55e !important;
    color: white !important;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.btn-add-cart-green:hover {
    background-color: #16a34a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}
.btn-add-cart-green svg {
    width: 20px;
    height: 20px;
}

/* ========================================================================= */
/*                      CUSTOM CONFIRMATION MODAL                            */
/* ========================================================================= */
.custom-modal-overlay {
    position: fixed !important;
    top: 0 !important; 
    left: 0 !important; 
    width: 100% !important; 
    height: 100% !important;
    background: rgba(0,0,0,0.6) !important;
    backdrop-filter: blur(5px) !important;
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}
.custom-modal-overlay.show {
    opacity: 1; 
    visibility: visible;
}
.custom-modal-box {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.custom-modal-overlay.show .custom-modal-box {
    transform: scale(1) translateY(0);
}
.custom-modal-box.scale-out {
    transform: scale(0.9) translateY(20px);
}
.custom-modal-icon {
    font-size: 3.5rem; 
    margin-bottom: 15px;
    display: inline-block;
    animation: shakeIcon 2s ease-in-out infinite;
}
@keyframes shakeIcon {
    0%, 100% { transform: rotate(-8deg) scale(1); }
    50% { transform: rotate(8deg) scale(1.1); }
}
.custom-modal-box h3 {
    margin: 0 0 10px 0; 
    font-size: 1.4rem; 
    color: var(--text-dark);
}
.custom-modal-box p {
    color: var(--text-gray); 
    margin: 0 0 24px 0; 
    font-size: 0.95rem; 
    line-height: 1.5;
}
.custom-modal-actions {
    display: flex; 
    gap: 12px; 
    justify-content: center;
}
.custom-modal-actions .btn {
    flex: 1;
    padding: 12px;
}
.btn-danger {
    background: #ef4444; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: 0.2s transform, 0.2s opacity;
}
.btn-danger:hover {
    background: #dc2626; 
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.btn-modal-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s background;
}
.btn-modal-cancel:hover {
    background: #e2e8f0;
}

/* Utility Classes */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.gap-30 { gap: 30px; }
.gap-40 { gap: 40px; }
.gap-80 { gap: 80px; }

.bg-primary { background-color: var(--primary) !important; }
.bg-bg-light { background-color: var(--bg-light) !important; }
.bg-white { background-color: white !important; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

.text-white { color: white !important; }
.opacity-80 { opacity: 0.8; }
.grayscale { filter: grayscale(100%); }
.filter-opacity-60 { opacity: 0.6; }

.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 42rem; }

/* Badge */
.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(29, 124, 249, 0.1);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 600px) {
  .products-section {
    padding: 16px 0 40px 0;
  }
  .product-card.card {
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 18px;
    padding: 0;
  }
  .prod-img {
    height: 140px;
    padding: 0;
  }
  .prod-img img {
    padding: 6px;
    border-radius: 0;
  }
  .prod-info {
    padding: 12px 10px 12px 10px;
  }
  .product-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }
  .cat-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    margin-bottom: 7px;
  }
  .badge {
    font-size: 0.62rem;
    padding: 3px 8px;
    top: 7px;
    left: 7px;
  }
  .card-footer {
    padding-top: 10px;
  }
  .btn-view-black, .btn-add-cart-green {
    font-size: 0.85rem;
    padding: 7px 10px;
    border-radius: 7px;
  }
  .grid-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 10px;
  }
  .results-count {
    font-size: 0.92rem;
  }
}
/* Hide Cart on Index Page */
.index-page .nav-cart-btn,
.index-page #cart-modal-overlay,
.index-page .cart-modal {
    display: none !important;
}
