/* ================================================================
   TOKO SAKINAH — Global Design System
   Bootstrap 5 companion stylesheet
   ================================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --pink-primary:    #E91E63;
  --pink-dark:       #C2185B;
  --pink-light:      #FCE4EC;
  --pink-hover:      #D81B60;

  /* Accent Colors */
  --red-badge:       #E53935;
  --gold-rating:     #FFA726;
  --green-success:   #43A047;
  --blue-info:       #1976D2;

  /* Neutrals */
  --dark:            #1a1a2e;
  --dark-soft:       #2d2d44;
  --gray-900:        #212121;
  --gray-700:        #616161;
  --gray-500:        #9E9E9E;
  --gray-300:        #E0E0E0;
  --gray-100:        #F5F5F5;
  --white:           #FFFFFF;

  /* Typography */
  --font-heading:    'Poppins', sans-serif;
  --font-body:       'Inter', sans-serif;

  /* Spacing */
  --section-gap:     3rem;

  /* Shadows */
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:       0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg:       0 8px 30px rgba(0,0,0,0.12);
  --shadow-card:     0 2px 8px rgba(0,0,0,0.06);

  /* Border Radius */
  --radius-sm:       6px;
  --radius-md:       10px;
  --radius-lg:       16px;
  --radius-full:     50px;

  /* Transitions */
  --transition:      all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-900);
  background-color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
}

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

a:hover {
  color: var(--pink-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Top Promo Bar ─────────────────────────────────────────────── */
.top-bar {
  background: var(--dark);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.3px;
  padding: 8px 0;
  text-align: center;
  position: relative;
  z-index: 1100;
}

.top-bar a {
  color: var(--white);
  text-decoration: underline;
  font-weight: 600;
}

.top-bar a:hover {
  color: var(--pink-light);
}

/* ── Main Header ───────────────────────────────────────────────── */
.main-header {
  background: var(--white);
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-300);
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo Area */
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-area img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

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

.logo-text .brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--gray-900);
}

.logo-text .brand-sub {
  font-size: 11.5px;
  color: var(--gray-500);
  font-weight: 400;
  letter-spacing: 0.3px;
}

.logo-area:hover .brand-name {
  color: var(--pink-primary);
}

/* Search Bar */
.search-wrapper {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-wrapper .form-control {
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-300);
  padding: 10px 20px 10px 44px;
  font-size: 13.5px;
  font-family: var(--font-body);
  background: var(--gray-100);
  transition: var(--transition);
  height: 44px;
}

.search-wrapper .form-control:focus {
  border-color: var(--pink-primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.search-wrapper .form-control::placeholder {
  color: var(--gray-500);
}

.search-wrapper .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 16px;
  pointer-events: none;
}

/* Header Nav Icons */
.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 14px;
  color: var(--gray-700);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  font-size: 11.5px;
  font-weight: 500;
}

.nav-icon-link i {
  font-size: 22px;
  transition: var(--transition);
}

.nav-icon-link:hover {
  color: var(--pink-primary);
  background: var(--pink-light);
}

.nav-icon-link.active {
  color: var(--pink-primary);
}

/* Cart Badge */
.cart-badge {
  position: absolute;
  top: 0;
  right: 6px;
  background: var(--red-badge);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ── Category Navbar / Tabs ────────────────────────────────────── */
.category-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  position: sticky;
  top: 73px; /* below header */
  z-index: 1040;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tabs li {
  flex-shrink: 0;
}

.category-tabs a {
  display: block;
  padding: 14px 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.category-tabs a:hover {
  color: var(--pink-primary);
  background: var(--pink-light);
}

.category-tabs a.active {
  color: var(--pink-primary);
  border-bottom-color: var(--pink-primary);
}

/* ── Footer ────────────────────────────────────────────────────── */
.main-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 50px 0 0;
  margin-top: var(--section-gap);
}

.footer-brand img {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
}

.footer-brand h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 16px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact-item i {
  color: var(--pink-primary);
  margin-top: 2px;
  font-size: 14px;
  flex-shrink: 0;
}

.footer-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2.5px;
  background: var(--pink-primary);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links a::before {
  content: '›';
  font-size: 16px;
  color: var(--pink-primary);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--white);
  padding-left: 4px;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 16px;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--pink-primary);
  color: var(--white);
  transform: translateY(-3px);
}

/* Footer Bottom / Copyright */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0;
  margin-top: 40px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom span {
  color: var(--pink-primary);
  font-weight: 600;
}

/* ── Badge Labels ──────────────────────────────────────────────── */
.badge-terlaris {
  background: var(--red-badge);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  letter-spacing: 0.3px;
}

.badge-baru {
  background: var(--green-success);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  letter-spacing: 0.3px;
}

/* ── Product Card ──────────────────────────────────────────────── */
.product-card {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  background: var(--white);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.product-card .card-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--gray-100);
}

.product-card .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.product-card .card-subcategory {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.product-card .card-title {
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card .card-price-main {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--pink-primary);
  margin-bottom: 2px;
}

.product-card .card-price-range {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.product-card .card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: auto;
}

.product-card .card-meta .rating {
  color: var(--gold-rating);
}

/* ── Utility Classes ───────────────────────────────────────────── */
.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  color: var(--gray-900);
  margin-bottom: 24px;
}

.btn-pink {
  background: var(--pink-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13.5px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-pink:hover {
  background: var(--pink-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.btn-outline-pink {
  background: transparent;
  color: var(--pink-primary);
  border: 1.5px solid var(--pink-primary);
  border-radius: var(--radius-full);
  padding: 10px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13.5px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-outline-pink:hover {
  background: var(--pink-primary);
  color: var(--white);
}

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

/* ── Page Content Wrapper ──────────────────────────────────────── */
.page-content {
  min-height: 60vh;
  padding: 24px 0;
}

/* ── Responsive ────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 991.98px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .search-wrapper {
    order: 3;
    max-width: 100%;
    flex: 0 0 100%;
    margin-top: 10px;
  }

  .nav-icon-link span {
    display: none;
  }

  .nav-icon-link {
    padding: 8px 10px;
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .top-bar {
    font-size: 11px;
    padding: 6px 0;
  }

  .logo-area img {
    width: 34px;
    height: 34px;
  }

  .logo-text .brand-name {
    font-size: 15px;
  }

  .logo-text .brand-sub {
    font-size: 10px;
  }

  .category-tabs a {
    padding: 12px 16px;
    font-size: 12px;
  }

  .main-header {
    padding: 10px 0;
  }

  .category-nav {
    top: 59px;
  }

  .nav-icon-link i {
    font-size: 20px;
  }

  .footer-heading {
    margin-top: 10px;
  }

  .main-footer {
    padding: 30px 0 0;
  }

  .product-card .card-price-main {
    font-size: 14px;
  }
}

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

.animate-fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

/* Stagger delay helpers */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Spinner utility */
@keyframes ts-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spinning { display: inline-block; animation: ts-spin 0.8s linear infinite; }
