/* ============================================================
   SATYAM GOLD - Main Stylesheet
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #1f2937;
  background: #fafafa;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

:root {
  --primary: #F97316;
  --primary-dark: #ea580c;
  --pink: #ec4899;
  --pink-dark: #db2777;
  --green: #22c55e;
  --green-dark: #16a34a;
  --blue: #2563eb;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 12px;
}

/* ---------- Header ---------- */
.sg-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.sg-header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
}
.sg-logo { display: flex; align-items: center; gap: 10px; }
.sg-logo img { height: 42px; width: auto; }
.sg-logo .name { font-weight: 700; font-size: 18px; color: var(--primary-dark); white-space: nowrap; }
.sg-nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.sg-nav a, .sg-nav button {
  padding: 8px 12px; border-radius: 8px; font-size: 14px;
  color: var(--gray-700); font-weight: 500;
}
.sg-nav a:hover, .sg-nav button:hover { background: var(--gray-100); color: var(--primary-dark); }
.sg-nav .icon-btn { position: relative; padding: 8px; }
.sg-nav .icon-btn .badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--pink); color: #fff; font-size: 11px;
  border-radius: 999px; padding: 2px 6px; font-weight: 700;
  min-width: 18px; text-align: center;
}
.sg-mobile-toggle { display: none; }
@media (max-width: 720px) {
  .sg-logo .name { font-size: 16px; }
  .sg-nav a { display: none; }
  .sg-nav .keep { display: inline-flex; }
  .sg-mobile-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.sg-hero {
  position: relative; max-width: 1280px; margin: 16px auto;
  border-radius: var(--radius); overflow: hidden;
  background: #fff;
}
.sg-hero .slides { position: relative; aspect-ratio: 16/6; min-height: 200px; }
@media (max-width: 720px) { .sg-hero .slides { aspect-ratio: 16/9; } }
.sg-hero .slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease;
  background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
}
.sg-hero .slide.active { opacity: 1; }
.sg-hero .slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.55));
  z-index: 1;
}
.sg-hero .slide > * { position: relative; z-index: 2; color: #fff; }
.sg-hero h1 { font-size: 28px; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.sg-hero p { font-size: 14px; margin-top: 6px; max-width: 600px; }
.sg-hero .cta {
  display: inline-block; margin-top: 12px; padding: 10px 22px;
  background: var(--primary); color: #fff; border-radius: 999px;
  font-weight: 600; width: fit-content;
}
.sg-hero .dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 5;
}
.sg-hero .dots span {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5);
  cursor: pointer;
}
.sg-hero .dots span.active { background: #fff; width: 24px; border-radius: 4px; }

/* ---------- Sections ---------- */
.sg-section { max-width: 1280px; margin: 24px auto; padding: 0 16px; }
.sg-section h2 {
  font-size: 22px; font-weight: 700; color: var(--gray-900);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.sg-section h2::before {
  content: ''; width: 4px; height: 22px; background: var(--primary); border-radius: 2px;
}

/* ---------- Product Grid (responsive) ---------- */
.sg-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
/* Mobile: still show 2 columns - smaller */
@media (max-width: 720px) {
  .sg-products {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
@media (max-width: 380px) {
  .sg-products { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ---------- Product Card ---------- */
.sg-card {
  background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.sg-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sg-card .img-wrap {
  position: relative;
  background: #f8f8f8;
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
}
.sg-card img.product-img {
  max-height: 100%; max-width: 100%; object-fit: contain;
}
.sg-card .badge-discount {
  position: absolute; top: 10px; left: 10px;
  background: var(--blue); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  z-index: 2;
}
.sg-card .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sg-card .name { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.sg-card .desc {
  font-size: 12px; color: var(--gray-500); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sg-card .weight { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.sg-card .price-row {
  display: flex; align-items: baseline; gap: 6px; margin-top: 4px;
}
.sg-card .price { font-size: 20px; font-weight: 800; color: var(--gray-900); }
.sg-card .mrp { font-size: 13px; color: var(--gray-500); text-decoration: line-through; }
.sg-card .loved {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--gray-500); margin-top: 4px;
  cursor: pointer; user-select: none;
}
.sg-card .loved .heart {
  width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: transform .2s;
  color: var(--gray-300);
}
.sg-card .loved.active .heart { color: #ef4444; transform: scale(1.15); }
.sg-card .loved:hover .heart { transform: scale(1.15); }

.sg-card .actions { display: flex; gap: 6px; margin-top: 10px; }
.sg-card .actions .bulk { margin-top: 6px; }
.sg-btn {
  flex: 1; padding: 10px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: opacity .2s, transform .1s;
}
.sg-btn:active { transform: scale(.97); }
.sg-btn-primary { background: var(--pink); color: #fff; }
.sg-btn-primary:hover { background: var(--pink-dark); }
.sg-btn-outline {
  background: #fff; color: var(--pink); border: 1.5px solid var(--pink);
}
.sg-btn-outline:hover { background: var(--pink); color: #fff; }
.sg-btn-success { background: var(--green); color: #fff; }
.sg-btn-success:hover { background: var(--green-dark); }
.sg-btn-disabled {
  background: var(--gray-300); color: var(--gray-500); cursor: not-allowed;
}

@media (max-width: 720px) {
  .sg-card .name { font-size: 14px; }
  .sg-card .desc { font-size: 11px; }
  .sg-card .price { font-size: 17px; }
  .sg-card .mrp { font-size: 12px; }
  .sg-btn { font-size: 12px; padding: 9px 8px; }
  .sg-card .body { padding: 10px; }
}

/* ---------- Modal ---------- */
.sg-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 16px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sg-modal {
  background: #fff; border-radius: 16px; max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.sg-modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.sg-modal-header h3 { font-size: 18px; font-weight: 700; }
.sg-modal-header .close {
  font-size: 22px; color: var(--gray-500);
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.sg-modal-header .close:hover { background: var(--gray-100); color: var(--gray-900); }
.sg-modal-body { padding: 20px; }
.sg-modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--gray-200);
  display: flex; gap: 8px; justify-content: flex-end;
}

/* ---------- Form ---------- */
.sg-field { margin-bottom: 14px; }
.sg-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--gray-700); }
.sg-field input, .sg-field textarea, .sg-field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  transition: border .2s;
}
.sg-field input:focus, .sg-field textarea:focus, .sg-field select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.15);
}

/* ---------- Login modal ---------- */
.login-welcome {
  text-align: center; padding: 8px 0 16px;
}
.login-welcome img { height: 56px; margin: 0 auto 10px; }
.login-welcome h2 { font-size: 22px; color: var(--primary-dark); }
.login-welcome p { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* ---------- Cart Drawer ---------- */
.sg-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 90;
  animation: fadeIn .2s ease;
}
.sg-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 100%; max-width: 420px;
  background: #fff; z-index: 91;
  display: flex; flex-direction: column;
  animation: slideIn .3s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
.sg-drawer-header {
  padding: 16px; border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.sg-drawer-body { flex: 1; overflow-y: auto; padding: 12px; }
.sg-drawer-footer {
  padding: 12px 16px; border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.cart-item {
  display: flex; gap: 12px; padding: 10px;
  border: 1px solid var(--gray-200); border-radius: 10px;
  margin-bottom: 8px; background: #fff;
}
.cart-item img { width: 64px; height: 64px; object-fit: contain; background: var(--gray-50); border-radius: 6px; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .info .nm { font-weight: 600; font-size: 14px; }
.cart-item .info .pr { color: var(--primary-dark); font-weight: 700; font-size: 14px; }
.cart-item .qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-item .qty button {
  width: 24px; height: 24px; border-radius: 6px; background: var(--gray-100);
  font-weight: 700;
}
.cart-item .rm { color: var(--gray-500); font-size: 18px; }

/* ---------- Footer ---------- */
.sg-footer {
  background: #1f2937; color: #d1d5db;
  margin-top: 40px; padding: 32px 16px 16px;
}
.sg-footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.sg-footer h4 { color: #fff; margin-bottom: 12px; font-size: 15px; }
.sg-footer ul { list-style: none; }
.sg-footer li { margin-bottom: 6px; font-size: 13px; }
.sg-footer a:hover { color: var(--primary); }
.sg-footer .socials { display: flex; gap: 10px; margin-top: 8px; }
.sg-footer .socials a {
  width: 36px; height: 36px; border-radius: 50%;
  background: #374151; display: inline-flex; align-items: center; justify-content: center;
}
.sg-footer .socials a:hover { background: var(--primary); color: #fff; }
.sg-footer-bottom {
  border-top: 1px solid #374151; margin-top: 24px;
  padding-top: 16px; text-align: center; font-size: 12px;
}

/* ---------- WhatsApp Float ---------- */
.sg-wa-float {
  position: fixed; bottom: 18px; right: 18px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  font-size: 26px;
}
.sg-wa-float:hover { transform: scale(1.05); }

/* ---------- Toast ---------- */
.sg-toast {
  position: fixed; bottom: 20px; left: 50%;
  transform: translate(-50%, 100px);
  background: var(--gray-900); color: #fff;
  padding: 12px 18px; border-radius: 10px;
  font-size: 14px; z-index: 200;
  transition: transform .3s ease;
  box-shadow: var(--shadow-lg);
  max-width: 90%;
}
.sg-toast.show { transform: translate(-50%, 0); }
.sg-toast-success { background: var(--green-dark); }
.sg-toast-error { background: #dc2626; }

/* ---------- Order Tracking Animation ---------- */
.tracker {
  display: flex; align-items: flex-start; justify-content: space-between;
  position: relative; padding: 20px 0;
  overflow-x: auto;
}
.tracker .step {
  flex: 1; min-width: 90px; text-align: center; position: relative;
  padding: 0 4px;
}
.tracker .step .dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gray-200); color: var(--gray-500);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 8px; font-size: 16px;
  position: relative; z-index: 2;
  transition: all .4s;
}
.tracker .step.done .dot {
  background: var(--green); color: #fff;
  animation: pop .4s ease;
}
.tracker .step.current .dot {
  background: var(--primary); color: #fff;
  box-shadow: 0 0 0 6px rgba(249,115,22,.2);
  animation: pulse 1.2s infinite;
}
.tracker .step.rejected .dot { background: #dc2626; color: #fff; }
@keyframes pop { 0% { transform: scale(.5); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 6px rgba(249,115,22,.2); }
  50% { box-shadow: 0 0 0 10px rgba(249,115,22,.05); }
}
.tracker .step::before {
  content: ''; position: absolute; top: 18px; left: -50%; right: 50%;
  height: 3px; background: var(--gray-200); z-index: 1;
}
.tracker .step:first-child::before { display: none; }
.tracker .step.done::before, .tracker .step.current::before { background: var(--green); }
.tracker .step .label { font-size: 11px; color: var(--gray-700); }
.tracker .step.current .label { color: var(--primary-dark); font-weight: 700; }

/* ---------- Page (Privacy / Terms / etc) ---------- */
.page-content {
  max-width: 800px; margin: 24px auto; padding: 24px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.page-content h2 { font-size: 24px; margin-bottom: 16px; color: var(--primary-dark); }
.page-content h3 { font-size: 18px; margin: 16px 0 8px; }
.page-content p { margin-bottom: 12px; }
.page-content ul, .page-content ol { padding-left: 22px; margin-bottom: 12px; }
.page-content li { margin-bottom: 6px; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center; padding: 40px 16px; color: var(--gray-500);
}
.empty svg { width: 72px; height: 72px; margin-bottom: 12px; opacity: .5; }

/* ---------- Loader ---------- */
.sg-loader {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid #fff; border-bottom-color: transparent;
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  background: linear-gradient(90deg, var(--gray-100), var(--gray-200), var(--gray-100));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
