/* APOLLICA - Design System */

:root {
  --primary: #E8272E;
  --primary-dark: #B91C1C;
  --secondary: #1A1A2E;
  --accent: #F97316;
  --bg-color: #FFFFFF;
  --surf-alt: #F5F5F5;
  --surf-dark: #F0F0F0;
  --border-color: #E2E2E2;
  --text-primary: #1A1A2E;
  --text-secondary: #555555;
  --text-light: #888888;
  --white: #FFFFFF;

  --success: #16A34A;
  --warning: #F59E0B;
  --error: #EF4444;
  --price-red: #E8272E;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.14);
}

body {
  font-family: 'Nunito Sans', sans-serif;
  color: var(--text-secondary);
  background-color: var(--bg-color);
  line-height: 1.5;
  font-size: 14px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--primary);
}

/* Animations */
.page-content {
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes cartPop {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.5);
  }

  70% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

.cart-count.pop {
  animation: cartPop 0.35s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-7px);
  }

  40% {
    transform: translateX(7px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

.input-error {
  border-color: var(--error) !important;
  animation: shake 0.35s ease;
}

@keyframes whatsappPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }

  50% {
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
  }
}

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: var(--shadow-md);
  z-index: 100;
  transition: transform 0.3s ease;
  animation: whatsappPulse 2.5s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: white;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: 6px;
  border: none;
  transition: all 0.2s ease;
  box-shadow: none;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
  background: var(--primary-dark) !important;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 8px 19px;
  border-radius: 6px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-secondary-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-order-cod {
  background: linear-gradient(135deg, #16A34A, #15803D);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 6px;
  border: none;
  transition: all 0.2s ease;
}

.btn-order-cod:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.35);
  color: white;
}

/* Forms */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(232, 39, 46, 0.12) !important;
  transition: all 0.15s ease;
}

/* Product Card */
.product-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.product-card:nth-child(1) {
  transition-delay: 0.04s;
}

.product-card:nth-child(2) {
  transition-delay: 0.08s;
}

.product-card:nth-child(3) {
  transition-delay: 0.12s;
}

.product-card:nth-child(4) {
  transition-delay: 0.16s;
}

.product-card:nth-child(5) {
  transition-delay: 0.20s;
}

.product-card:nth-child(6) {
  transition-delay: 0.24s;
}

.product-card__image-wrap {
  position: relative;
  background: var(--surf-alt);
  padding-top: 100%;
  /* square aspect ratio */
  overflow: hidden;
}

.product-card__image-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card__image-wrap img {
  transform: scale(1.06);
}

.product-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.badge-sale {
  background: var(--primary);
  color: white;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  margin-right: 4px;
  display: inline-block;
}

.badge-new {
  background: var(--success);
  color: white;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-block;
}

.badge-soon {
  background: #6B7280;
  color: white;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-block;
}

.product-card__body {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-card__name {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  line-height: 1.4;
  height: 38px;
}

.product-card__name:hover {
  color: var(--primary);
}

.product-card__price {
  margin-top: auto;
}

.price-current {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--price-red);
}

.price-original {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 12px;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: 4px;
}

.price-soon {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px;
  color: #6B7280;
  font-style: italic;
}

.btn-add-to-cart {
  background: var(--secondary);
  color: white;
  width: 100%;
  border: none;
  padding: 8px;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13px;
  margin-top: 8px;
  transition: all 0.2s ease;
}

.btn-add-to-cart:hover {
  background: var(--primary);
}


/* Layout Classes */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header A */
.top-bar {
  background: var(--primary);
  color: white;
  height: 36px;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 500;
  font-size: 12px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Header B */
.main-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  height: 64px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1030;
  /* Below sweetalert, above content */
}

.main-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  flex: 0 0 200px;
}

.header-logo img {
  max-height: 44px;
}

.header-search {
  flex: 1 1 auto;
  margin: 0 24px;
  position: relative;
}

.search-form {
  display: flex;
  height: 42px;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  background: white;
}

.search-form:focus-within {
  border-color: var(--primary);
}

.search-form .cat-select {
  border: none;
  background: transparent;
  padding: 0 10px;
  border-right: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
  max-width: 140px;
}

.search-form .cat-select:focus {
  outline: none;
  box-shadow: none;
  border-color: inherit !important;
}

.search-form input {
  flex: 1;
  border: none;
  padding: 0 15px;
  font-size: 14px;
}

.search-form input:focus {
  outline: none;
  box-shadow: none;
  border-color: transparent !important;
}

.search-form button {
  background: var(--primary);
  color: white;
  width: 42px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.search-form button:hover {
  background: var(--primary-dark);
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0 0 6px 6px;
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  margin-top: 4px;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.search-result-item:hover {
  background: var(--surf-alt);
}

.search-result-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.search-result-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.search-result-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--price-red);
  font-family: 'Poppins', sans-serif;
}

.header-actions {
  flex: 0 0 200px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.header-icon {
  position: relative;
  font-size: 20px;
  color: var(--text-primary);
  transition: color 0.2s;
}

.header-icon:hover {
  color: var(--primary);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: bold;
  height: 16px;
  min-width: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Header C */
.nav-bar {
  background: var(--secondary);
  height: 44px;
  color: white;
}

.nav-bar .container {
  display: flex;
  height: 100%;
}

.cat-menu-btn {
  background: var(--primary);
  color: white;
  width: 220px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  position: relative;
}

.cat-mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 220px;
  background: #151525;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: all 0.2s;
  box-shadow: var(--shadow-lg);
}

.cat-menu-btn:hover .cat-mega-menu {
  visibility: visible;
  opacity: 1;
}

.cat-mega-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cat-mega-link:hover {
  background: var(--primary);
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 20px;
  gap: 24px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  /* Firefox */
}

.nav-links::-webkit-scrollbar {
  display: none;
}

/* Chrome */
.nav-item {
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  display: flex;
  align-items: center;
  height: 100%;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
  color: white;
  border-bottom-color: var(--primary);
}

/* Footer */
.main-footer {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 20px 0;
  font-size: 13px;
}

.footer-title {
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-logo {
  max-height: 40px;
  margin-bottom: 12px;
}

.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.2s;
}

.social-icon:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Category grid on home */
.cat-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  object-fit: cover;
  margin: 0 auto;
  transition: all 0.25s ease;
}

.cat-item:hover .cat-circle {
  border-color: var(--primary);
  transform: scale(1.06);
}

.cat-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-primary);
  margin-top: 8px;
}

/* Section padding */
.section-padding {
  padding: 40px 0;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.title-underline {
  height: 3px;
  background: var(--primary);
  width: 60px;
  margin-top: 8px;
  margin-bottom: 24px;
}

.see-all-link {
  color: var(--primary);
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Trust badges */
.trust-icon {
  color: var(--primary);
  font-size: 40px;
  margin-bottom: 12px;
}

.trust-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* =============================================
   BANNER MOBILE OPTIMIZATION
   ============================================= */

/* Hero Slider Banner */
.hero-banner-img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}

/* Small 3 Promo Banners — scrollable row */
.promo-banner-row {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE */
}

.promo-banner-row::-webkit-scrollbar {
  display: none;
}

.promo-banner-item {
  width: calc(33.333% - 8px);
  min-width: 260px;
}

.promo-banner-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  transition: all 0.2s;
  display: block;
}

.promo-banner-item:hover .promo-banner-img {
  transform: scale(1.01);
  filter: brightness(1.05);
}

/* Mid Banners (Mega Sale / New Collection) */
.mid-banner-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* =============================================
   RESPONSIVE ADJUSTMENTS
   ============================================= */
@media (max-width: 1023px) {
  .header-actions {
    flex: 0 0 auto;
    gap: 12px;
  }

  .header-phone {
    display: none;
  }

  .header-search {
    margin: 0 16px;
  }

  .cat-menu-btn {
    width: 44px;
    justify-content: center;
  }

  .cat-menu-btn span {
    display: none;
  }

  .cat-mega-menu {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .main-header {
    height: 54px;
  }

  .header-logo {
    flex: 0 0 auto;
  }

  .header-logo img {
    max-height: 32px;
  }

  .header-search {
    display: none;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 10px;
  }

  .section-padding {
    padding: 32px 0;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Banner mobile sizes */
  .hero-banner-img {
    height: 200px;
  }

  .promo-banner-item {
    min-width: 200px;
  }

  .promo-banner-img {
    height: 90px;
  }

  .mid-banner-img {
    height: 120px;
  }

  /* COD Button mobile fix */
  .btn-order-cod {
    font-size: 13px;
    padding: 10px 16px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
  }

  /* Product detail mobile adjustments */
  .product-card__name {
    font-size: 12px;
    height: auto;
  }

  .price-current {
    font-size: 14px;
  }

  /* Ensure offcanvas shows above everything */
  .offcanvas {
    z-index: 1055;
  }

  .offcanvas-backdrop {
    z-index: 1050;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .hero-banner-img {
    height: 280px;
  }

  .mid-banner-img {
    height: 140px;
  }
}