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

/* ===== CSS Variables ===== */
:root {
  --white: #FFFFFF;
  --off-white: #FFF9F0;
  --cream: #FFF3E0;
  --yellow: #FFD700;
  --yellow-light: #FFF176;
  --orange: #FF8C00;
  --orange-dark: #E67600;
  --orange-light: #FFB74D;
  --text-dark: #2D2D2D;
  --text-medium: #5A5A5A;
  --text-light: #8A8A8A;
  --shadow-sm: 0 2px 8px rgba(255,140,0,0.08);
  --shadow-md: 0 4px 20px rgba(255,140,0,0.12);
  --shadow-lg: 0 8px 40px rgba(255,140,0,0.18);
  --shadow-xl: 0 12px 48px rgba(255,140,0,0.22);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--orange) 0%, var(--yellow) 100%);
  padding: 0 24px;
  box-shadow: 0 4px 20px rgba(255,140,0,0.25);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
  letter-spacing: -0.5px;
}

.logo img {
  height: 45px;
  width: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.5);
}

.logo span { font-size: 0.6em; font-weight: 400; opacity: 0.9; }

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

.cart-btn {
  position: relative;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.cart-btn:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.cart-btn .cart-icon { font-size: 1.3rem; }

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--text-dark);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-badge.pulse {
  animation: badgePulse 0.4s ease;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 40%, var(--yellow) 100%);
  padding: 60px 24px 80px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: heroFloat 20s linear infinite;
}

@keyframes heroFloat {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}

.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  text-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  font-weight: 300;
  line-height: 1.6;
}

/* ===== Section Titles ===== */
.section-title {
  text-align: center;
  padding: 48px 24px 32px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  border-radius: 2px;
}

/* ===== Category Cards ===== */
.categories-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.category-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: var(--transition);
}

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

.category-card-img-wrapper {
  overflow: hidden;
  position: relative;
}

.category-card-img-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, rgba(0,0,0,0.05));
}

.category-card-body {
  padding: 20px 24px 24px;
}

.category-card-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.category-card-body p {
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.5;
}

.category-card-arrow {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.category-card:hover .category-card-arrow {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--orange);
  font-weight: 500;
  transition: var(--transition);
}

.breadcrumb a:hover { color: var(--orange-dark); }

/* ===== Category Header ===== */
.category-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px 0;
}

.category-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.category-header p {
  color: var(--text-medium);
  margin-top: 4px;
}

/* ===== Subcategory Filter ===== */
.filter-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--white);
  color: var(--text-medium);
  border: 2px solid #eee;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: var(--white);
  border-color: var(--orange);
  box-shadow: var(--shadow-sm);
}

/* ===== Product Cards ===== */
.products-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card-img-wrapper {
  overflow: hidden;
  position: relative;
  background: var(--cream);
}

.product-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: var(--transition);
}

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

.product-card-subcategory {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,140,0,0.9);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-code {
  font-size: 0.75rem;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.product-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-card-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--orange);
}

.product-price span { font-size: 0.85rem; font-weight: 500; }

.add-to-cart-btn {
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.add-to-cart-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.add-to-cart-btn.added {
  background: #4CAF50;
}

/* ===== Cart Sidebar ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

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

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--white);
  z-index: 2001;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,0.15);
}

.cart-sidebar.open { right: 0; }

.cart-sidebar-header {
  padding: 24px;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-sidebar-header h2 { font-size: 1.3rem; font-weight: 700; }

.cart-close-btn {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.cart-close-btn:hover { background: rgba(255,255,255,0.4); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.cart-empty .cart-empty-icon { font-size: 3rem; margin-bottom: 12px; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: var(--transition);
}

.cart-item:hover { box-shadow: var(--shadow-sm); }

.cart-item-img {
  width: 65px;
  height: 65px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-code {
  font-size: 0.72rem;
  color: var(--orange);
  font-weight: 500;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--orange);
  margin-top: 4px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: var(--transition);
}

.qty-btn:hover { border-color: var(--orange); color: var(--orange); }

.cart-item-qty {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  background: none;
  color: #e53935;
  font-size: 1.1rem;
  padding: 4px;
  transition: var(--transition);
  margin-left: auto;
}

.cart-item-remove:hover { transform: scale(1.2); }

.cart-sidebar-footer {
  padding: 20px 24px;
  border-top: 2px solid var(--cream);
  background: var(--white);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total-label { font-size: 1rem; font-weight: 600; color: var(--text-medium); }

.cart-total-value { font-size: 1.5rem; font-weight: 800; color: var(--orange); }

.whatsapp-order-btn {
  width: 100%;
  padding: 16px;
  background: #25D366;
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(37,211,102,0.3);
}

.whatsapp-order-btn:hover {
  background: #1DA851;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,0.4);
}

.whatsapp-order-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===== Toast Notification ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-dark);
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 3000;
  opacity: 0;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Footer ===== */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.85rem;
}

.footer a {
  color: var(--yellow);
  font-weight: 500;
  transition: var(--transition);
}

.footer a:hover { color: var(--orange); }

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  max-width: 48px;
  max-height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7) !important;
  transition: var(--transition);
  overflow: hidden;
}

.social-link svg {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  max-width: 24px;
  max-height: 24px;
  flex-shrink: 0;
}

.social-link:hover {
  transform: translateY(-4px) scale(1.1);
  color: var(--white) !important;
}

.social-whatsapp:hover { background: #25D366; box-shadow: 0 6px 20px rgba(37,211,102,0.4); }
.social-instagram:hover { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); box-shadow: 0 6px 20px rgba(225,48,108,0.4); }
.social-tiktok:hover { background: #000000; box-shadow: 0 6px 20px rgba(0,0,0,0.4); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .categories-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .header-inner { height: 60px; }
  .logo { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .hero { padding: 40px 16px 60px; }
  .hero h1 { font-size: 1.6rem; }
  .categories-grid, .products-grid { padding: 0 16px 40px; }
  .product-card-img { height: 180px; }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }
.animate-in:nth-child(6) { animation-delay: 0.6s; }
