/* ============================================
   Triunique - Main Stylesheet
   Primary: #8805ef
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --primary: #8805ef;
  --primary-dark: #6b03c1;
  --primary-light: #b64aff;
  --primary-pale: #f3e8ff;
  --accent: #ff6b35;
  --white: #ffffff;
  --off-white: #fafafa;
  --gray-50: #f8f8f8;
  --gray-100: #f0f0f0;
  --gray-200: #e4e4e4;
  --gray-400: #aaaaaa;
  --gray-600: #666666;
  --gray-800: #222222;
  --black: #0a0a0a;
  --text: #1a1a1a;
  --text-muted: #777777;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --shadow-primary: 0 8px 32px rgba(136,5,239,0.25);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ============================================
   Utility
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 400;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.badge-new { background: var(--primary); color: #fff; }
.badge-sale { background: var(--accent); color: #fff; }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(136,5,239,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-md);
}
.btn-white:hover {
  background: var(--primary-pale);
  transform: translateY(-2px);
}

.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius-lg); }

.btn-wa {
  background: #25D366;
  color: #fff;
  width: 100%;
  justify-content: center;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 11px 16px;
  transition: var(--transition);
  gap: 6px;
}
.btn-wa:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,211,102,0.35);
}
.btn-wa svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================================
   Header / Navbar
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: var(--black); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition);
  position: relative;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}
.nav-links a:hover::after { width: 100%; }

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   Hero Carousel
   ============================================ */
.hero-carousel {
  position: relative;
  overflow: hidden;
  background: var(--black);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  position: relative;
  height: 520px;
  display: flex;
  align-items: center;
}
@media (max-width: 768px) { .carousel-slide { height: 360px; } }

.carousel-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a0033;
}
.carousel-slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.carousel-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  color: #fff;
  padding: 0 40px;
}
@media (max-width: 768px) { .carousel-content { padding: 0 20px; } }

.carousel-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.carousel-content p {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  opacity: 0.85;
  margin-bottom: 28px;
  line-height: 1.6;
  max-width: 420px;
}

.carousel-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 100px;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.carousel-dot.active {
  width: 24px;
  background: #fff;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.carousel-arrow:hover { background: rgba(255,255,255,0.25); }
.carousel-arrow.prev { left: 20px; }
.carousel-arrow.next { right: 20px; }
@media (max-width: 480px) { .carousel-arrow { display: none; } }

/* ============================================
   Section Spacing
   ============================================ */
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

/* ============================================
   Product Grid
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

/* ============================================
   Product Card
   ============================================ */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-pale);
}

.product-card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--gray-50);
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.product-card:hover .product-card-image img { transform: scale(1.06); }

.product-card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.product-card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.product-card-pricing {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.product-original-price {
  font-size: 0.82rem;
  color: var(--gray-400);
  text-decoration: line-through;
}

.product-discount {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.product-card-footer {
  padding: 12px 16px 16px;
}

/* ============================================
   Category Filter
   ============================================ */
.category-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 2px solid transparent;
  transition: var(--transition);
}
.filter-btn:hover { color: var(--primary); background: var(--primary-pale); }
.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================
   New Products Section
   ============================================ */
.new-products-section { background: var(--off-white); }

.new-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.6);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .nav-logo { color: #fff; margin-bottom: 12px; }
.footer-brand .nav-logo span { color: rgba(255,255,255,0.5); }

.footer-desc { font-size: 0.88rem; line-height: 1.7; max-width: 260px; }

.footer-heading {
  font-family: var(--font-display);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}

.footer-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.footer-wa-btn:hover { background: #1ebe5d; transform: translateY(-2px); }

/* ============================================
   Loading Skeleton
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   Toast Notification
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--black);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  max-width: 320px;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left: 4px solid #25D366; }
.toast.error { border-left: 4px solid #ef4444; }

/* ============================================
   No Products State
   ============================================ */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 20px; opacity: 0.25; }
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 8px;
}

/* ============================================
   Mobile Nav Overlay
   ============================================ */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: #fff;
  z-index: 1001;
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-overlay.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.mobile-nav a:hover { background: var(--gray-50); color: var(--primary); }
.mobile-nav-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

/* ============================================
   Scroll-to-top
   ============================================ */
.scroll-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  box-shadow: var(--shadow-primary);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: var(--transition);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap:24px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn { display: none; }
  .hamburger { display: flex; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .section { padding: 48px 0; }
  .section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-card-body { padding: 12px; }
  .product-card-footer { padding: 8px 12px 12px; }
}
