/* =====================================================
   MORSIMO SHOP - Main Stylesheet (Neumorphic Design)
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg, #f0f4f8);
  color: var(--text, #1e293b);
  font-family: var(--font, 'Plus Jakarta Sans', sans-serif);
}

/* ── Neumorphic Base ── */
.neu-card {
  background: var(--bg, #f0f4f8);
  border-radius: var(--radius, 16px);
  box-shadow: 8px 8px 20px rgba(166,180,200,.5), -6px -6px 16px rgba(255,255,255,.9);
  transition: box-shadow .2s, transform .2s;
}
.neu-card:hover {
  box-shadow: 12px 12px 28px rgba(166,180,200,.6), -8px -8px 20px rgba(255,255,255,1);
  transform: translateY(-2px);
}
.neu-btn {
  background: var(--bg, #f0f4f8);
  box-shadow: 4px 4px 10px rgba(166,180,200,.5), -3px -3px 8px rgba(255,255,255,.9);
  border: none;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
  color: var(--text, #1e293b);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.neu-btn:hover {
  box-shadow: 6px 6px 14px rgba(166,180,200,.6), -4px -4px 10px rgba(255,255,255,1);
  transform: translateY(-1px);
}
.neu-btn:active {
  box-shadow: inset 3px 3px 8px rgba(166,180,200,.5), inset -2px -2px 6px rgba(255,255,255,.9);
  transform: translateY(0);
}
.neu-input {
  background: var(--bg, #f0f4f8);
  box-shadow: inset 4px 4px 10px rgba(166,180,200,.4), inset -3px -3px 8px rgba(255,255,255,.8);
  border: none;
  color: var(--text, #1e293b);
  outline: none;
  transition: box-shadow .2s;
}
.neu-input:focus {
  box-shadow: inset 5px 5px 12px rgba(166,180,200,.5), inset -4px -4px 10px rgba(255,255,255,.9), 0 0 0 3px rgba(var(--primary-rgb), .15);
}
.neu-input::placeholder { color: #94a3b8; }

/* ── Primary Button ── */
.btn-primary {
  background: var(--primary, #0ea5e9);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, filter .15s;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), .35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), .45);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); filter: brightness(.95); }

.btn-secondary {
  background: var(--secondary, #f59e0b);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(245,158,11,.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-secondary:hover { transform: translateY(-1px); }

/* ── Header ── */
.shop-header {
  background: rgba(240,244,248,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 2px 20px rgba(166,180,200,.25);
}

/* ── Category Nav ── */
.cat-nav-link {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  color: #64748b;
  transition: all .2s;
  text-decoration: none;
}
.cat-nav-link:hover, .cat-nav-link.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 12px rgba(var(--primary-rgb), .35);
}

/* ── Badges ── */
.badge-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent, #ec4899);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(236,72,153,.4);
}
.badge-sale {
  background: var(--accent, #ec4899);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 50px;
}
.badge-new {
  background: #10b981;
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 50px;
}
.badge-stock {
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
}
.badge-stock.in  { background: #d1fae5; color: #065f46; }
.badge-stock.out { background: #fee2e2; color: #991b1b; }

/* ── Product Card ── */
.product-card {
  background: var(--bg);
  border-radius: var(--radius, 16px);
  box-shadow: 8px 8px 20px rgba(166,180,200,.45), -6px -6px 16px rgba(255,255,255,.9);
  transition: transform .25s, box-shadow .25s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 14px 14px 32px rgba(166,180,200,.55), -8px -8px 22px rgba(255,255,255,1);
}
.product-card .img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px) calc(var(--radius) - 4px) 0 0;
  background: rgba(var(--primary-rgb), .04);
  aspect-ratio: 1;
}
.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(8px);
  transition: all .25s;
}
.product-card:hover .card-actions { opacity: 1; transform: translateX(0); }
.card-action-btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  transition: all .2s;
  color: #475569;
  text-decoration: none;
}
.card-action-btn:hover { background: var(--primary); color: #fff; transform: scale(1.1); }
.card-action-btn.wishlisted { background: #fce7f3; color: #ec4899; }
.product-card .card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.product-card .card-title {
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .card-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.product-card .price-main { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.product-card .price-old { font-size: .8rem; color: #94a3b8; text-decoration: line-through; }
.product-card .card-footer { margin-top: auto; }

/* ── Hero Section ── */
.hero-section {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius)*1.5);
  margin: 16px;
}

/* ── Section Header ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: 1.5rem; font-weight: 800; position: relative; }
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin-top: 4px;
}

/* ── Toast ── */
.toast {
  background: #1e293b;
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: .85rem;
  font-weight: 600;
  min-width: 220px;
  max-width: 320px;
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  animation: slideInToast .3s ease forwards;
  border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: #10b981; }
.toast.error   { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Footer ── */
.shop-footer {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(226,232,240,.6) 100%);
  border-top: 1px solid rgba(255,255,255,.7);
}
.footer-link {
  color: #64748b;
  font-size: .875rem;
  text-decoration: none;
  transition: color .2s;
  display: block;
}
.footer-link:hover { color: var(--primary); }
.social-btn {
  width: 36px;
  height: 36px;
  background: var(--bg);
  box-shadow: 4px 4px 10px rgba(166,180,200,.4), -3px -3px 8px rgba(255,255,255,.8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-decoration: none;
  transition: all .2s;
}
.social-btn:hover { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(var(--primary-rgb),.35); }

/* ── Dropdown ── */
.dropdown-item {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: .875rem;
  color: #374151;
  text-decoration: none;
  transition: background .15s;
}
.dropdown-item:hover { background: rgba(var(--primary-rgb), .08); color: var(--primary); }

/* ── Mobile Nav ── */
.mobile-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: .9rem;
  color: #374151;
  text-decoration: none;
  transition: background .15s;
  margin-bottom: 2px;
}
.mobile-nav-link:hover { background: rgba(var(--primary-rgb),.08); color: var(--primary); }

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, rgba(200,213,225,.4) 25%, rgba(200,213,225,.7) 50%, rgba(200,213,225,.4) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Rating Stars ── */
.star-rating { display: inline-flex; gap: 2px; }
.star { cursor: pointer; transition: transform .15s; }
.star:hover { transform: scale(1.2); }

/* ── Form Styles ── */
.form-label { font-size: .875rem; font-weight: 600; color: #374151; margin-bottom: 6px; display: block; }
.form-input {
  width: 100%;
  background: var(--bg);
  box-shadow: inset 4px 4px 10px rgba(166,180,200,.4), inset -3px -3px 8px rgba(255,255,255,.8);
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: .9rem;
  color: var(--text);
  transition: box-shadow .2s;
  font-family: var(--font);
}
.form-input:focus {
  outline: none;
  box-shadow: inset 5px 5px 12px rgba(166,180,200,.5), inset -4px -4px 10px rgba(255,255,255,.9), 0 0 0 3px rgba(var(--primary-rgb),.15);
}
.form-input::placeholder { color: #94a3b8; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%2394a3b8' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.form-error { font-size: .8rem; color: #ef4444; margin-top: 4px; }
.form-group { margin-bottom: 18px; }

/* ── Alert ── */
.alert { border-radius: 12px; padding: 12px 16px; font-size: .875rem; font-weight: 500; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid #f59e0b; }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }

/* ── Range Slider ── */
input[type=range] { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 2px; background: rgba(var(--primary-rgb),.2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: 0 2px 8px rgba(var(--primary-rgb),.4); }

/* ── Quantity Input ── */
.qty-wrap { display: inline-flex; align-items: center; gap: 0; border-radius: 12px; overflow: hidden; box-shadow: 4px 4px 10px rgba(166,180,200,.4), -3px -3px 8px rgba(255,255,255,.9); }
.qty-btn { width: 38px; height: 38px; background: transparent; border: none; cursor: pointer; font-size: 1.1rem; font-weight: 700; color: var(--primary); transition: background .15s; }
.qty-btn:hover { background: rgba(var(--primary-rgb),.1); }
.qty-input { width: 44px; height: 38px; text-align: center; border: none; background: transparent; font-weight: 700; font-size: .9rem; color: var(--text); }
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Tab System ── */
.tab-list { display: flex; gap: 4px; border-bottom: 2px solid rgba(var(--primary-rgb),.1); margin-bottom: 24px; }
.tab-btn { padding: 10px 20px; border: none; background: none; cursor: pointer; font-weight: 600; font-size: .875rem; color: #64748b; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Breadcrumb ── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: #94a3b8; flex-wrap: wrap; }
.breadcrumb a { color: #64748b; text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: #cbd5e1; }

/* ── Sticky Add to Cart (mobile) ── */
.sticky-atc {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(240,244,248,.95);
  backdrop-filter: blur(16px);
  padding: 12px 16px;
  box-shadow: 0 -4px 24px rgba(0,0,0,.1);
  border-top: 1px solid rgba(255,255,255,.7);
  display: none;
}
@media (max-width: 768px) { .sticky-atc { display: flex; gap: 12px; } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb),.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--primary-rgb),.5); }

/* ── Responsive Helpers ── */
@media (max-width: 640px) {
  .hero-section { margin: 8px; border-radius: var(--radius); }
  .section-title { font-size: 1.25rem; }
  .neu-card { box-shadow: 5px 5px 14px rgba(166,180,200,.4), -4px -4px 10px rgba(255,255,255,.9); }
}

/* ── Loading Spinner ── */
.spinner { width: 24px; height: 24px; border: 3px solid rgba(var(--primary-rgb),.2); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Progress Bar ── */
.progress-bar { height: 6px; background: rgba(var(--primary-rgb),.15); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width .5s ease; }

/* ── Image Zoom Modal ── */
.img-zoom-modal { position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.img-zoom-modal img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 12px; }

/* ── Compare Bar ── */
.compare-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  z-index: 50; background: #1e293b; color: #fff; padding: 14px 24px;
  border-radius: 20px 20px 0 0; display: flex; gap: 16px; align-items: center;
  transition: transform .3s; min-width: 300px; box-shadow: 0 -4px 24px rgba(0,0,0,.25);
}
.compare-bar.show { transform: translateX(-50%) translateY(0); }
