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

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

:root {
  --primary: #e040a0;
  --primary-dark: #c0307a;
  --primary-light: #fdf0f8;
  --accent: #ffb3d9;
  --dark: #2e1a2a;
  --darker: #1a0f18;
  --text: #333;
  --text-light: #777;
  --text-muted: #aaa;
  --bg: #fafafa;
  --bg-alt: #f2f2f7;
  --white: #fff;
  --border: #e8e8e8;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ======== ANNOUNCEMENT BAR ======== */
.announcement-bar {
  background: var(--dark);
  color: #ccc;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
}

.announcement-bar strong { color: var(--accent); }
.announcement-bar i { margin-right: 0.4rem; color: var(--primary); }

/* ======== HEADER ======== */
.store-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.7rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.logo i { font-size: 1.3rem; }
.logo strong { color: var(--dark); }

.store-nav {
  display: flex;
  gap: 1.8rem;
}

.store-nav a {
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.store-nav a:hover, .store-nav a.active { color: var(--dark); }

.store-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.nav-badge {
  font-size: 0.6rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  vertical-align: super;
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.search-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  width: 200px;
  transition: border-color 0.2s, width 0.3s;
}

.search-input:focus-within {
  border-color: var(--primary);
  width: 260px;
}

.search-input i { color: var(--text-muted); font-size: 0.8rem; }

.search-input input {
  border: none;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  outline: none;
  width: 100%;
  color: var(--text);
}

.header-actions > i {
  font-size: 1.05rem;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s;
}

.header-actions > i:hover { color: var(--primary); }

.cart-icon {
  position: relative;
  cursor: pointer;
}

.cart-icon i { font-size: 1.05rem; color: var(--text-light); transition: color 0.2s; }
.cart-icon:hover i { color: var(--primary); }

.cart-badge {
  position: absolute;
  top: -6px; right: -8px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
}

.header-login-trigger { cursor: pointer; }

/* ======== HERO ======== */
.hero { position: relative; }

.hero-slide { position: relative; height: 480px; overflow: hidden; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(15,15,26,0.85) 0%, rgba(15,15,26,0.4) 100%);
  display: flex;
  align-items: center;
  padding: 0 8%;
}

.hero-content { max-width: 560px; }

.hero-tag {
  display: inline-block;
  background: rgba(255,107,53,0.15);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(255,107,53,0.3);
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.05rem;
  color: #b0b0c0;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-btns { display: flex; gap: 0.8rem; }

.hero-btn {
  padding: 0.8rem 2rem;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.hero-btn.primary {
  background: var(--primary);
  color: var(--white);
}

.hero-btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255,107,53,0.4);
}

.hero-btn.secondary {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.3);
}

.hero-btn.secondary:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
}

.hero-btn i { margin-left: 0.3rem; font-size: 0.8rem; }

/* ======== TRUST BAR ======== */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 1.8rem 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.trust-item i {
  font-size: 1.4rem;
  color: var(--primary);
}

.trust-item strong {
  display: block;
  font-size: 0.85rem;
  color: var(--dark);
}

.trust-item span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ======== SECTION HEADERS ======== */
.section-header {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark);
}

.view-all {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

.view-all:hover { text-decoration: underline; }
.view-all i { margin-left: 0.3rem; font-size: 0.7rem; }

/* ======== CATEGORIES ======== */
.categories {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 200px;
  cursor: pointer;
  transition: transform 0.2s;
}

.category-card:hover { transform: translateY(-4px); }
.category-card:hover img { transform: scale(1.08); }

.category-card img {
  transition: transform 0.4s;
}

.category-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 1.2rem 0.8rem 0.8rem;
  color: var(--white);
}

.category-overlay h3 { font-size: 0.9rem; font-weight: 600; }
.category-overlay p { font-size: 0.7rem; opacity: 0.75; }

/* ======== PRODUCTS ======== */
.featured {
  padding: 4rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}

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

.product-img {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--bg-alt);
}

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

.product-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 0.25rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 6px;
  z-index: 2;
}

.product-badge.sale { background: #ff4444; color: var(--white); }
.product-badge.new { background: var(--primary); color: var(--white); }

.product-actions {
  position: absolute;
  top: 10px; right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s;
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

.product-actions button {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  display: flex; justify-content: center; align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
  font-size: 0.8rem;
}

.product-actions button:hover {
  background: var(--primary);
  color: var(--white);
}

.product-info { padding: 1rem 1.2rem 1.2rem; }

.product-category {
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0.3rem 0;
}

.stars {
  color: var(--accent);
  font-size: 0.72rem;
  margin-bottom: 0.5rem;
}

.stars span {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-left: 0.2rem;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}

.price-old {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.add-cart-btn {
  width: 100%;
  padding: 0.6rem;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.add-cart-btn:hover { background: var(--primary); }

/* ======== PROMO BANNER ======== */
.promo-banner {
  padding: 3rem 2rem;
  background: var(--bg-alt);
}

.promo-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.promo-image { height: 100%; min-height: 350px; }

.promo-content { padding: 2.5rem 3rem 2.5rem 0; }

.promo-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.promo-content h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.8rem;
}

.promo-content p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.promo-timer {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.timer-box {
  background: var(--dark);
  color: var(--white);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  text-align: center;
  min-width: 60px;
}

.timer-box span { display: block; font-size: 1.3rem; font-weight: 700; }
.timer-box small { font-size: 0.65rem; color: #999; text-transform: uppercase; }

/* ======== NEWSLETTER ======== */
.newsletter {
  padding: 4rem 2rem;
  background: var(--dark);
  color: var(--white);
}

.newsletter-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.newsletter-text { flex: 1; }
.newsletter-text h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.newsletter-text p { font-size: 0.85rem; color: #aab; line-height: 1.5; }

.newsletter-form {
  display: flex;
  gap: 0;
  flex-shrink: 0;
}

.newsletter-form input {
  padding: 0.75rem 1.2rem;
  border: none;
  border-radius: 10px 0 0 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  outline: none;
  width: 260px;
  background: #2a2a40;
  color: var(--white);
}

.newsletter-form input::placeholder { color: #666; }

.newsletter-form button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0 10px 10px 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.newsletter-form button:hover { background: var(--primary-dark); }
.newsletter-form button i { margin-left: 0.4rem; }

/* ======== FOOTER ======== */
.store-footer {
  background: var(--darker);
  color: #999;
  padding: 3.5rem 2rem 1.5rem;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.footer-col h4 i { margin-right: 0.4rem; color: var(--primary); }

.footer-col p { font-size: 0.82rem; line-height: 1.7; }

.footer-col a {
  display: block;
  color: #888;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

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

.social-links {
  display: flex;
  gap: 0.7rem;
  margin-top: 1rem;
}

.social-links a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #1e1e30;
  display: flex; justify-content: center; align-items: center;
  transition: all 0.2s;
}

.social-links a:hover { background: var(--primary); }
.social-links a i { font-size: 0.85rem; color: #999; }
.social-links a:hover i { color: var(--white); }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #1e1e30;
  padding-top: 1.5rem;
  font-size: 0.78rem;
}

.footer-payments {
  display: flex;
  gap: 0.8rem;
}

.footer-payments i { font-size: 1.6rem; color: #555; }

#footerYear { cursor: default; }

/* ======== MODAL ======== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(6px);
}

.modal-overlay.active { display: flex; }

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  background: var(--dark);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
}

.modal-close { cursor: pointer; opacity: 0.7; }
.modal-close:hover { opacity: 1; }

.modal-body {
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
}

.modal-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.2rem;
}

.error-message {
  background: #fff0f0;
  border: 1px solid #ffcccc;
  border-radius: 8px;
  padding: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #cc3333;
  display: none;
}

.pin-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.pin-box {
  width: 46px; height: 54px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}

.pin-box::-webkit-outer-spin-button,
.pin-box::-webkit-inner-spin-button { -webkit-appearance: none; }

.pin-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.pin-box.filled {
  border-color: var(--primary);
  background: var(--primary-light);
}

.pin-box.error {
  border-color: #cc3333;
  animation: shake 0.4s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}

.modal-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-btn:hover { background: var(--primary-dark); }
.modal-btn:disabled { background: #ccc; cursor: not-allowed; }

/* ======== RESPONSIVE ======== */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-inner { grid-template-columns: 1fr; }
  .promo-image { min-height: 250px; }
  .promo-content { padding: 2rem; }
}

@media (max-width: 768px) {
  .store-nav { display: none; }
  .search-input { display: none; }
  .hero-slide { height: 380px; }
  .hero h1 { font-size: 2.2rem; }
  .trust-bar { flex-wrap: wrap; gap: 1.5rem; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-inner { flex-direction: column; text-align: center; }
  .newsletter-form { width: 100%; }
  .newsletter-form input { flex: 1; width: auto; }
  .footer-bottom { flex-direction: column; gap: 1rem; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-slide { height: 320px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-btns { flex-direction: column; }
  .promo-timer { flex-wrap: wrap; justify-content: center; }
}
