/* ===== Khazana Shop - Shared Styles ===== */
@import url('https://fonts.googleapis.cn/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --primary: #0F766E;
  --primary-light: #14B8A6;
  --accent: #F59E0B;
  --bg: #F0FDF4;
  --card: #FFFFFF;
  --text-primary: #134E4A;
  --text-secondary: #5EEAD4;
  --text-muted: #6B7280;
  --border: #D1FAE5;
  --shadow: 0 4px 24px rgba(15, 118, 110, 0.08);
  --shadow-hover: 0 8px 32px rgba(15, 118, 110, 0.16);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s ease-out;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a { text-decoration: none; color: inherit; }

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

/* ===== NAV ===== */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 24px;
  color: var(--primary);
  display: flex; align-items: center; gap: 8px;
}
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-weight: 500; font-size: 15px;
  color: var(--text-primary);
  transition: 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 0.3s ease-out;
}
.nav-links a:hover::after { width: 100%; }
.cart-icon {
  position: relative; cursor: pointer;
  font-size: 22px; display: flex; align-items: center; gap: 6px;
}
.cart-badge {
  position: absolute; top: -8px; right: -12px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mobile-menu-btn {
  display: none; background: none; border: none;
  font-size: 24px; cursor: pointer; color: var(--primary);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #5EEAD4 100%);
  padding: 80px 24px 120px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
  animation: fadeInUp 0.8s ease-out;
}
.hero p {
  font-size: clamp(16px, 2.5vw, 22px);
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto 32px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: 14px 36px; border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: 16px;
  border: none; cursor: pointer;
  transition: var(--transition);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}
.hero-cta:hover {
  transform: scale(1.02);
  background: #D97706;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

/* ===== SECTION ===== */
.section {
  padding: 64px 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  text-align: center;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 48px;
  max-width: 520px;
  margin-left: auto; margin-right: auto;
}

/* ===== CAROUSEL ===== */
.carousel-section { background: #fff; }
.carousel-wrapper {
  position: relative;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s ease-in-out;
  padding: 8px 0;
}
.carousel-card {
  min-width: calc(33.333% - 16px);
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  flex-shrink: 0;
}
.carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.carousel-card img {
  width: 100%; height: 280px;
  object-fit: cover;
}
.carousel-card-body {
  padding: 20px;
}
.carousel-card-body h3 {
  font-size: 18px; margin-bottom: 4px;
}
.carousel-card-body .price {
  font-size: 22px; font-weight: 700;
  color: var(--primary);
}
.carousel-card-body .price-symbol {
  font-size: 16px; font-weight: 500;
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--primary);
  transition: var(--transition); z-index: 10;
}
.carousel-btn:hover {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

/* ===== CATEGORIES ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.category-item {
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.category-item:hover { transform: translateY(-4px); }
.category-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #CCFBF1, #99F6E4);
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  transition: var(--transition);
}
.category-item:hover .category-icon {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  transform: scale(1.08);
}
.category-item:hover .category-icon span { filter: brightness(10); }
.category-name {
  font-weight: 600; font-size: 14px;
  color: var(--text-primary);
}

/* ===== PRODUCT GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.product-card-img {
  width: 100%; height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease-out;
}
.product-card:hover .product-card-img {
  transform: scale(1.05);
}
.product-card-img-wrapper {
  overflow: hidden;
  position: relative;
}
.product-card-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
}
.product-card-add {
  position: absolute; bottom: 12px; right: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  opacity: 0; transform: translateY(8px);
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.3);
}
.product-card:hover .product-card-add {
  opacity: 1; transform: translateY(0);
}
.product-card-add:hover {
  background: var(--primary-light);
  transform: scale(1.1) !important;
}
.product-card-body {
  padding: 16px;
}
.product-card-body h3 {
  font-size: 16px; font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-card-body .category-tag {
  font-size: 12px; color: var(--primary-light);
  font-weight: 500; margin-bottom: 8px;
}
.product-card-body .price {
  font-size: 20px; font-weight: 700;
  color: var(--primary);
}
.product-card-body .price-symbol {
  font-size: 14px; font-weight: 500;
}

/* ===== TRUST ===== */
.trust-section {
  background: #fff;
  padding: 48px 24px;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.trust-item {
  text-align: center;
}
.trust-icon {
  font-size: 36px; margin-bottom: 12px;
}
.trust-item h4 {
  font-size: 16px; margin-bottom: 4px;
}
.trust-item p {
  font-size: 13px; color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--text-primary);
  color: #fff;
  padding: 64px 24px 32px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.footer h4 {
  font-size: 18px; margin-bottom: 20px;
  color: var(--text-secondary);
}
.footer p, .footer a {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 2;
}
.footer a:hover { color: var(--text-secondary); }
.footer-bottom {
  max-width: 1280px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-bottom a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a:hover { color: var(--text-secondary); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: 14px;
  border: none; cursor: pointer;
  transition: var(--transition);
}
.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.3);
}
.btn-accent {
  background: var(--accent); color: #fff;
}
.btn-accent:hover {
  background: #D97706;
  transform: scale(1.02);
}
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary); color: #fff;
}

/* ===== PRODUCT DETAIL ===== */
.product-detail {
  padding: 40px 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.product-detail-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.product-detail-info h1 {
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 8px;
}
.product-detail-info .detail-category {
  color: var(--primary-light);
  font-weight: 500; font-size: 14px;
  margin-bottom: 16px;
}
.product-detail-info .detail-price {
  font-size: 32px; font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
}
.product-detail-info .detail-price .price-symbol {
  font-size: 20px;
}
.detail-desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 32px;
}
.detail-qty {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.detail-qty label { font-weight: 600; }
.qty-control {
  display: flex; align-items: center;
  border: 2px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.qty-control button {
  width: 40px; height: 40px;
  background: var(--bg); border: none;
  font-size: 18px; cursor: pointer;
  transition: var(--transition);
}
.qty-control button:hover { background: var(--primary); color: #fff; }
.qty-control input {
  width: 50px; height: 40px;
  text-align: center; border: none;
  font-size: 16px; font-weight: 600;
  outline: none;
}
.detail-actions {
  display: flex; gap: 16px;
}
.detail-actions .btn { padding: 14px 32px; font-size: 16px; }

/* ===== CART ===== */
.cart-page {
  padding: 40px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.cart-page h1 {
  font-size: 32px; margin-bottom: 32px;
}
.cart-empty {
  text-align: center; padding: 80px 24px;
  color: var(--text-muted);
}
.cart-empty .empty-icon { font-size: 64px; margin-bottom: 16px; }
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}
.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
  display: flex; gap: 16px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  align-items: center;
}
.cart-item img {
  width: 100px; height: 100px;
  object-fit: cover; border-radius: 8px;
}
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: 16px; margin-bottom: 4px; }
.cart-item-info .cart-item-price {
  font-size: 18px; font-weight: 700;
  color: var(--primary);
}
.cart-item-remove {
  background: none; border: none;
  color: #EF4444; cursor: pointer;
  font-size: 20px; padding: 8px;
  transition: var(--transition);
}
.cart-item-remove:hover { color: #DC2626; }
.cart-summary {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky; top: 80px;
}
.cart-summary h3 {
  font-size: 20px; margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.summary-row {
  display: flex; justify-content: space-between;
  margin-bottom: 12px; font-size: 15px;
}
.summary-row.total {
  font-weight: 700; font-size: 18px;
  margin-top: 16px; padding-top: 16px;
  border-top: 2px solid var(--border);
  color: var(--primary);
}
.cart-summary .btn {
  width: 100%; margin-top: 20px;
  padding: 14px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease-out;
}
.modal-overlay.active {
  opacity: 1; pointer-events: auto;
}
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px; width: 90%;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease-out;
}
.modal-overlay.active .modal {
  transform: translateY(0);
}
.modal h2 {
  font-size: 24px; margin-bottom: 8px;
}
.modal p {
  color: var(--text-muted); margin-bottom: 24px;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  font-size: 24px; cursor: pointer;
  color: var(--text-muted);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block; font-weight: 600;
  font-size: 14px; margin-bottom: 6px;
}
.form-group input {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px; font-size: 15px;
  outline: none; transition: var(--transition);
  font-family: 'Inter', sans-serif;
}
.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.otp-inputs {
  display: flex; gap: 8px; justify-content: center;
}
.otp-inputs input {
  width: 48px; height: 56px;
  text-align: center; font-size: 22px;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: 8px; outline: none;
  transition: var(--transition);
}
.otp-inputs input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

/* ===== PAYMENT METHODS ===== */
.payment-methods {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 20px;
}
.payment-method {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.payment-method:hover, .payment-method.selected {
  border-color: var(--primary);
  background: #F0FDF4;
}
.payment-method .pm-logo {
  width: 56px; height: 56px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  color: #fff;
}
.pm-jazzcash { background: linear-gradient(135deg, #E4002B, #8B0000); }
.pm-easypaisa { background: linear-gradient(135deg, #36B37E, #006644); }
.payment-method .pm-info h4 { font-size: 16px; }
.payment-method .pm-info p { font-size: 13px; margin: 0; }

/* ===== POLICY PAGES ===== */
.policy-page {
  padding: 48px 24px;
  max-width: 860px;
  margin: 0 auto;
}
.policy-page h1 {
  font-size: 32px; margin-bottom: 24px;
  color: var(--primary);
}
.policy-page h2 {
  font-size: 22px; margin: 32px 0 12px;
  color: var(--text-primary);
}
.policy-page p, .policy-page li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.policy-page ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 16px 24px;
  max-width: 1280px;
  margin: 0 auto;
  font-size: 14px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 8px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--primary);
  color: #fff; padding: 14px 24px;
  border-radius: 8px; font-weight: 500;
  box-shadow: 0 4px 20px rgba(15, 118, 110, 0.3);
  z-index: 3000;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.4s ease-out;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeInUp 0.6s ease-out both;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .carousel-card { min-width: calc(50% - 12px); }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .carousel-card { min-width: calc(80% - 12px); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .product-detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .cart-layout { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    gap: 16px;
  }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 60px 24px 100px; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .carousel-card { min-width: 92%; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-grid { grid-template-columns: 1fr 1fr; }
}
