/* My Digital World – multi-theme */
:root,
[data-theme="soft"] {
  --blue: #7B9EAE;
  --blue-dark: #6A8FA0;
  --yellow: #E8C99B;
  --orange: #E09A8C;
  --green: #8FBA98;
  --bg: #F7F5F2;
  --surface: #ffffff;
  --white: #ffffff;
  --text: #3D3D3D;
  --text-muted: #8E8E8E;
  --border: #E5E1DC;
  --shadow: 0 1px 3px rgba(61, 61, 61, 0.06);
  --shadow-hover: 0 4px 20px rgba(61, 61, 61, 0.08);
  --header-text: #ffffff;
  --header-muted: rgba(255, 255, 255, 0.88);
  --on-accent: #ffffff;
  --search-bg: #ffffff;
  --product-image-bg: linear-gradient(180deg, #FAFAF8 0%, #F0EDE8 100%);
  --slide-1: linear-gradient(135deg, #A8C5D9 0%, #7B9EAE 100%);
  --slide-2: linear-gradient(135deg, #F0D4B8 0%, #E09A8C 100%);
  --slide-3: linear-gradient(135deg, #B8D4BC 0%, #8FBA98 100%);
  --banner-1: linear-gradient(135deg, #A8C5D9, #7B9EAE);
  --banner-2: linear-gradient(135deg, #F0D4B8, #E09A8C);
  --banner-3: linear-gradient(135deg, #B8D4BC, #8FBA98);
  --footer-bg: #5D6D7E;
  --footer-heading: #B8C5CE;
  --footer-text: rgba(255, 255, 255, 0.92);
  --footer-muted: rgba(255, 255, 255, 0.7);
  --overlay: rgba(0, 0, 0, 0.45);
  --cart-footer-bg: #FAF8F5;
  --btn-add-hover: #D0887C;
  --btn-buy-hover: #DDB882;
  --toast-bg: #6B7B8C;
  --slide-cta-bg: #ffffff;
  --slide-cta-text: #3D3D3D;
  --carousel-btn-bg: rgba(255, 255, 255, 0.95);
  --carousel-btn-text: #3D3D3D;
  --radius: 8px;
  --header-h: 56px;
}

[data-theme="bright"] {
  --blue: #2874f0;
  --blue-dark: #1a5dc8;
  --yellow: #ff9f00;
  --orange: #fb641b;
  --green: #388e3c;
  --bg: #f1f3f6;
  --surface: #ffffff;
  --white: #ffffff;
  --text: #212121;
  --text-muted: #878787;
  --border: #e0e0e0;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --header-text: #ffffff;
  --header-muted: rgba(255, 255, 255, 0.9);
  --on-accent: #ffffff;
  --search-bg: #ffffff;
  --product-image-bg: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  --slide-1: linear-gradient(135deg, #2874f0 0%, #1a5dc8 100%);
  --slide-2: linear-gradient(135deg, #ff9f00 0%, #fb641b 100%);
  --slide-3: linear-gradient(135deg, #00897b 0%, #00695c 100%);
  --banner-1: linear-gradient(135deg, #2874f0, #1a5dc8);
  --banner-2: linear-gradient(135deg, #ff9f00, #fb641b);
  --banner-3: linear-gradient(135deg, #00897b, #00695c);
  --footer-bg: #172337;
  --footer-heading: #878787;
  --footer-text: #ffffff;
  --footer-muted: rgba(255, 255, 255, 0.7);
  --overlay: rgba(0, 0, 0, 0.5);
  --cart-footer-bg: #fafafa;
  --btn-add-hover: #e85a17;
  --btn-buy-hover: #e89100;
  --toast-bg: #323232;
  --slide-cta-bg: #ffffff;
  --slide-cta-text: #212121;
  --carousel-btn-bg: rgba(255, 255, 255, 0.95);
  --carousel-btn-text: #212121;
  --radius: 4px;
}

[data-theme="dark"] {
  --blue: #4A6274;
  --blue-dark: #3D5260;
  --yellow: #C9A86C;
  --orange: #C4847A;
  --green: #6B9B76;
  --bg: #1A1D21;
  --surface: #252A31;
  --white: #252A31;
  --text: #E8EAED;
  --text-muted: #9AA0A6;
  --border: #3A4048;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.4);
  --header-text: #E8EAED;
  --header-muted: rgba(232, 234, 237, 0.85);
  --on-accent: #ffffff;
  --search-bg: #2E343C;
  --product-image-bg: linear-gradient(180deg, #2E343C 0%, #252A31 100%);
  --slide-1: linear-gradient(135deg, #4A6274 0%, #3D5260 100%);
  --slide-2: linear-gradient(135deg, #6B5344 0%, #8B5E56 100%);
  --slide-3: linear-gradient(135deg, #4A6B52 0%, #3D5A45 100%);
  --banner-1: linear-gradient(135deg, #4A6274, #3D5260);
  --banner-2: linear-gradient(135deg, #6B5344, #8B5E56);
  --banner-3: linear-gradient(135deg, #4A6B52, #3D5A45);
  --footer-bg: #14171A;
  --footer-heading: #9AA0A6;
  --footer-text: rgba(232, 234, 237, 0.92);
  --footer-muted: rgba(232, 234, 237, 0.65);
  --overlay: rgba(0, 0, 0, 0.65);
  --cart-footer-bg: #2E343C;
  --btn-add-hover: #A87068;
  --btn-buy-hover: #B09258;
  --toast-bg: #3D5260;
  --slide-cta-bg: #E8EAED;
  --slide-cta-text: #1A1D21;
  --carousel-btn-bg: rgba(37, 42, 49, 0.95);
  --carousel-btn-text: #E8EAED;
  --radius: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1248px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Top Bar */
.top-bar {
  background: var(--blue);
  color: var(--header-text);
  font-size: 12px;
}

.top-bar-inner {
  max-width: 1248px;
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  gap: 24px;
  justify-content: flex-end;
}

.top-link {
  color: var(--header-muted);
  transition: color 0.2s;
}

.top-link:hover {
  color: var(--header-text);
}

/* Header */
.header {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(61, 61, 61, 0.08);
}

.header-inner {
  max-width: 1248px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-width: 140px;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--header-text);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.logo-accent {
  color: var(--yellow);
  font-style: italic;
}

.logo-tagline {
  font-size: 11px;
  color: var(--header-muted);
  font-style: italic;
}

.logo-tagline .plus {
  color: var(--yellow);
  font-weight: 600;
}

.search-box {
  flex: 1;
  display: flex;
  max-width: 564px;
  background: var(--search-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(61, 61, 61, 0.06);
}

.search-box input {
  flex: 1;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  background: var(--search-bg);
  color: var(--text);
}

.search-btn {
  background: var(--search-bg);
  padding: 0 16px;
  color: var(--blue);
  display: flex;
  align-items: center;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--header-text);
  font-size: 16px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cart-link {
  position: relative;
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 8px;
  background: var(--orange);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Category Nav */
.category-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.category-nav-inner {
  max-width: 1248px;
  margin: 0 auto;
  padding: 0 8px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav-inner::-webkit-scrollbar {
  display: none;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.cat-item:hover,
.cat-item.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.cat-icon {
  font-size: 18px;
}

/* Hero Carousel */
.hero-section {
  padding: 16px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  height: 280px;
  box-shadow: var(--shadow-hover);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-slide.slide-1 { background: var(--slide-1); }
.carousel-slide.slide-2 { background: var(--slide-2); }
.carousel-slide.slide-3 { background: var(--slide-3); }

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 60px;
  color: var(--header-text);
}

.slide-content {
  max-width: 55%;
}

.slide-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.slide-content h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.slide-content p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 20px;
}

.slide-cta {
  display: inline-block;
  background: var(--slide-cta-bg);
  color: var(--slide-cta-text);
  padding: 10px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.slide-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(61, 61, 61, 0.1);
}

.slide-visual {
  width: 340px;
  height: 190px;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0.9;
  filter: drop-shadow(0 8px 20px rgba(61, 61, 61, 0.12));
}

.slide-visual.has-image {
  background: transparent;
}

.slide-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  background: var(--carousel-btn-bg);
  color: var(--carousel-btn-text);
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
  background: var(--carousel-btn-bg);
  opacity: 0.95;
}

.carousel-btn.prev { left: 0; border-radius: 0 4px 4px 0; }
.carousel-btn.next { right: 0; border-radius: 4px 0 0 4px; }

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* Deals Strip */
.deals-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}

.deals-strip-inner {
  max-width: 1248px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
}

.deal-chip {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.deal-chip strong {
  color: var(--orange);
}

/* Sections */
.section {
  padding: 24px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.view-all {
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
}

.view-all:hover {
  text-decoration: underline;
}

/* Category Cards */
.category-cards-section {
  background: var(--surface);
  margin-top: 8px;
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.category-card-img {
  width: 64px;
  height: 64px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 6px;
}

.category-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.category-card span {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--green);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius);
}

.product-image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  background: var(--product-image-bg);
  border-radius: var(--radius);
  margin-bottom: 4px;
  overflow: hidden;
}

.product-image img,
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.no-product-image {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.product-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.rating-badge {
  background: var(--green);
  color: var(--on-accent);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}

.rating-count {
  color: var(--text-muted);
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price-current {
  font-size: 18px;
  font-weight: 600;
}

.price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-discount {
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
}

.product-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.btn-add-cart {
  flex: 1;
  background: var(--orange);
  color: var(--on-accent);
  padding: 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, opacity 0.2s;
}

.btn-add-cart:hover {
  background: var(--btn-add-hover);
  opacity: 0.95;
}

.btn-buy {
  flex: 1;
  background: var(--yellow);
  color: var(--text);
  padding: 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, opacity 0.2s;
}

.btn-buy:hover {
  background: var(--btn-buy-hover);
}

/* Promo Banners */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.promo-banner {
  padding: 28px 24px;
  border-radius: var(--radius);
  color: var(--header-text);
  cursor: pointer;
  transition: transform 0.2s;
  display: block;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

.promo-banner:hover {
  transform: scale(1.02);
}

.banner-blue { background: var(--banner-1); }
.banner-orange { background: var(--banner-2); }
.banner-green { background: var(--banner-3); }

.promo-banner h3 {
  font-size: 22px;
  margin-bottom: 4px;
}

.promo-banner p {
  opacity: 0.9;
  margin-bottom: 12px;
}

.promo-banner-img {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 16px;
  opacity: 0.24;
}

.banner-cta {
  font-size: 14px;
  font-weight: 600;
}

/* Footer */
.footer {
  margin-top: 32px;
  background: var(--footer-bg);
  color: var(--footer-text);
}

.footer-top {
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.footer-col h4 {
  font-size: 12px;
  color: var(--footer-heading);
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.footer-col a {
  display: block;
  font-size: 12px;
  color: var(--footer-text);
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--yellow);
}

.footer-col p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--footer-text);
  opacity: 0.85;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--footer-muted);
}

.footer-payments {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

/* Cart Sidebar */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100%;
  height: 100%;
  background: var(--surface);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--blue);
  color: var(--header-text);
}

.cart-header h3 {
  font-size: 18px;
}

.cart-close {
  font-size: 28px;
  color: var(--header-text);
  line-height: 1;
  padding: 4px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-img {
  width: 56px;
  height: 56px;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

.cart-item-remove {
  color: var(--orange);
  font-size: 12px;
  margin-top: 4px;
}

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--cart-footer-bg);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 16px;
}

.cart-total strong {
  font-size: 20px;
  color: var(--text);
}

.checkout-btn {
  width: 100%;
  background: var(--orange);
  color: var(--on-accent);
  padding: 14px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s;
}

.checkout-btn:hover {
  background: var(--btn-add-hover);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: 4px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  color: var(--text-muted);
}

.modal h3 {
  font-size: 24px;
  margin-bottom: 8px;
}

.modal-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  outline: none;
  background: var(--surface);
  color: var(--text);
}

.modal-input:focus {
  border-color: var(--blue);
}

.modal-btn {
  width: 100%;
  background: var(--orange);
  color: var(--on-accent);
  padding: 14px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
}

.modal-footer-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
  text-align: center;
}

/* Login Page */
.login-page-shell {
  max-width: 1120px;
  margin: 32px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

.login-hero-panel,
.login-form-panel {
  border-radius: 18px;
  box-shadow: var(--shadow-hover);
}

.login-hero-panel {
  background: var(--slide-1);
  color: var(--header-text);
  padding: 48px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-hero-panel h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 14px 0 12px;
}

.login-hero-panel p {
  font-size: 17px;
  opacity: 0.92;
  max-width: 520px;
}

.login-benefits {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.login-benefits li {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
}

.login-form-panel {
  background: var(--surface);
  padding: 40px;
}

.login-form-panel h2 {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--text);
}

.login-page-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.login-page-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.login-page-form .modal-input {
  margin-top: 8px;
  margin-bottom: 0;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

.login-otp-btn {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--blue);
  color: var(--blue);
  border-radius: var(--radius);
  font-weight: 700;
  background: transparent;
}

.login-create-text {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.login-create-text a {
  color: var(--blue);
  font-weight: 700;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--toast-bg);
  color: var(--on-accent);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 400;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Product Detail Page */
.product-detail-page {
  padding: 24px 0 48px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--blue);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-image {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 160px;
  background: var(--product-image-bg);
  border-radius: var(--radius);
  min-height: 360px;
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 340px;
  object-fit: contain;
}

.detail-no-image {
  color: var(--text-muted);
  font-size: 16px;
  text-align: center;
  padding: 24px;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.gallery-thumb {
  height: 64px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 4px;
  overflow: hidden;
}

.gallery-thumb.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(40, 116, 240, 0.12);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.spin-controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.spin-controls button {
  background: var(--blue);
  color: var(--on-accent);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.spin-hint {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.detail-info h1 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.3;
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-price-box {
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.detail-price {
  font-size: 28px;
  font-weight: 600;
}

.detail-features {
  list-style: none;
  margin-bottom: 24px;
}

.detail-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid #F0EDE8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
}

.detail-actions {
  display: flex;
  gap: 16px;
}

.detail-actions .btn-add-cart,
.detail-actions .btn-buy {
  flex: none;
  padding: 16px 48px;
  font-size: 16px;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius);
}

/* Theme Switcher */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 3px;
}

[data-theme="dark"] .theme-switcher {
  background: rgba(0, 0, 0, 0.25);
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 12px;
  font-weight: 500;
  color: var(--header-muted);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.theme-btn:hover {
  color: var(--header-text);
  background: rgba(255, 255, 255, 0.12);
}

.theme-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .theme-btn.active {
  background: var(--search-bg);
  color: var(--header-text);
}

.theme-btn-icon {
  font-size: 14px;
  line-height: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .login-page-shell {
    grid-template-columns: 1fr;
  }

  .login-hero-panel {
    min-height: auto;
  }

  .category-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .banner-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar { display: none; }

  .header-inner {
    flex-wrap: wrap;
  }

  .search-box {
    order: 3;
    max-width: 100%;
    width: 100%;
  }

  .logo { min-width: auto; }

  .nav-item span:not(.cart-count) {
    display: none;
  }

  .theme-btn-label {
    display: none;
  }

  .theme-switcher {
    order: 2;
  }

  .carousel-slide {
    padding: 24px 40px;
  }

  .slide-content h2 {
    font-size: 22px;
  }

  .slide-visual {
    width: 180px;
    height: 110px;
    font-size: 11px;
  }

  .category-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-actions {
    flex-direction: column;
  }

  .detail-actions .btn-add-cart,
  .detail-actions .btn-buy {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .login-hero-panel,
  .login-form-panel {
    padding: 26px;
  }

  .login-hero-panel h1 {
    font-size: 30px;
  }

  .category-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-carousel {
    height: 220px;
  }

  .carousel-btn {
    width: 32px;
    height: 60px;
    font-size: 22px;
  }
}
