/* ============================================
   IT EQUIPMENT STORE - MODERN TECH THEME
   สไตล์ร้านขายอุปกรณ์ IT แบบ JIB / Advice
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap');

:root,
.theme-it3d {
  /* Clean Light Palette */
  --bg-deep: #f5f6f8;
  --bg-dark: #eef0f4;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.96);

  /* Accent - Orange (CTA) + Navy (Header) */
  --accent-cyan: #ff6b00;
  --accent-cyan-dim: rgba(255, 107, 0, 0.15);
  --accent-blue: #2563eb;
  --accent-purple: #7c3aed;
  --accent-pink: #e63946;
  --header-bg: #1B2838;
  --header-bg-glass: rgba(27, 40, 56, 0.97);
  --price-color: #e63946;

  /* Text */
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #718096;

  /* Glow */
  --glow-cyan: 0 4px 20px rgba(255, 107, 0, 0.25);
  --glow-blue: 0 4px 20px rgba(37, 99, 235, 0.2);
}

/* Override body for IT theme */
body.theme-it3d {
  font-family: 'Inter', 'Noto Sans Thai', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
}

/* Header - Dark navy */
.theme-it3d .header {
  background: var(--header-bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.theme-it3d .logo {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.theme-it3d .logo:hover {
  color: #ff6b00;
}

.theme-it3d .logo-icon {
  background: linear-gradient(135deg, #ff6b00, #ff8c33);
  box-shadow: 0 3px 12px rgba(255, 107, 0, 0.4);
  font-size: 1.1rem;
  border-radius: 0.6rem;
}

.theme-it3d .nav-link {
  color: rgba(255, 255, 255, 0.75);
}

.theme-it3d .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.theme-it3d .nav-link.active {
  color: #ff6b00;
  background: rgba(255, 107, 0, 0.15);
}

/* ปุ่มตะกร้าใน header ให้เด่นชัด */
.theme-it3d .header .nav-links a.cart-link {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem !important;
  margin: 0 0.25rem;
  background: rgba(255, 107, 0, 0.15) !important;
  border: 1px solid rgba(255, 107, 0, 0.5) !important;
  border-radius: 9999px;
  color: #ff8c33 !important;
  font-weight: 700;
  font-size: 0.9375rem;
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.15);
}

.theme-it3d .header .nav-links a.cart-link:hover {
  background: rgba(255, 107, 0, 0.25) !important;
  border-color: #ff6b00 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(255, 107, 0, 0.3);
}

.theme-it3d .header .cart-link .cart-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-it3d .header .cart-badge {
  display: inline-flex !important;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6b00, #ff8c33) !important;
  color: #fff !important;
  border: none;
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.4);
}

.theme-it3d .header .cart-badge.cart-badge-empty {
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: none;
}

/* Profile trigger in dark header */
.theme-it3d .profile-trigger {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.theme-it3d .profile-trigger:hover {
  border-color: rgba(255, 107, 0, 0.5);
  background: rgba(255, 255, 255, 0.12);
}
.theme-it3d .profile-name {
  color: rgba(255, 255, 255, 0.9);
}
.theme-it3d .profile-chevron {
  color: rgba(255, 255, 255, 0.5);
}

.theme-it3d .btn-primary {
  background: linear-gradient(135deg, #ff6b00, #ff8c33);
  color: #fff;
  box-shadow: 0 3px 12px rgba(255, 107, 0, 0.3);
  font-weight: 700;
}

.theme-it3d .btn-primary:hover {
  background: linear-gradient(135deg, #e55f00, #ff6b00);
  color: #fff;
  box-shadow: 0 6px 24px rgba(255, 107, 0, 0.4);
  transform: translateY(-2px);
}

.theme-it3d .btn-secondary {
  background: var(--bg-elevated);
  color: #ff6b00;
  border: 1.5px solid rgba(255, 107, 0, 0.4);
}

.theme-it3d .btn-secondary:hover {
  background: rgba(255, 107, 0, 0.06);
  border-color: #ff6b00;
}

/* ============================================
   3D HERO SECTION
   ============================================ */
.hero-it3d {
  position: relative;
  padding: 4rem 2rem 5rem;
  border-radius: 1.25rem;
  overflow: hidden;
  margin-bottom: 3rem;
}

.hero-it3d::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1B2838 0%, #2d4059 50%, #1B2838 100%);
  border-radius: inherit;
}

.hero-it3d .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.hero-it3d .hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff6b00;
  background: rgba(255, 107, 0, 0.15);
  border: 1px solid rgba(255, 107, 0, 0.4);
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero-it3d h1 {
  font-size: 2.75rem;
  font-weight: 800;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background: none;
}

.hero-it3d .hero-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 2rem;
  line-height: 1.7;
}

/* 3D floating shapes in hero */
.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.hero-shape {
  position: absolute;
  border: 1px solid rgba(255, 107, 0, 0.2);
  border-radius: 50%;
  animation: floatShape 15s ease-in-out infinite;
}

.hero-shape:nth-child(1) {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.hero-shape:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 10%;
  animation-delay: -3s;
}

.hero-shape:nth-child(3) {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 15%;
  animation-delay: -6s;
}

.hero-shape:nth-child(4) {
  width: 40px;
  height: 40px;
  top: 30%;
  right: 25%;
  animation-delay: -9s;
}

@keyframes floatShape {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }

  50% {
    transform: translate(20px, -20px) scale(1.1);
    opacity: 0.8;
  }
}

/* ============================================
   3D CATEGORY CARDS
   ============================================ */
.cat-grid-3d {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  perspective: 1000px;
}

.cat-card-3d {
  position: relative;
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.cat-card-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.cat-card-3d:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 107, 0, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.cat-card-3d:hover::before {
  opacity: 1;
}

.cat-card-3d .cat-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ff6b00, #ff8c33);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

.cat-card-3d h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text-primary);
}

.cat-card-3d p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================
   3D PRODUCT CARDS
   ============================================ */
.product-grid-3d {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.75rem;
  perspective: 1200px;
}

.product-card-3d {
  position: relative;
  background: var(--bg-card);
  border: 1px solid #e8eaed;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  max-width: 280px;
  width: 100%;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.product-card-3d .product-card-inner {
  transition: transform 0.3s ease;
}

.product-card-3d:hover {
  border-color: rgba(255, 107, 0, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.product-card-3d:hover .product-card-inner {
  transform: none;
}

.product-card-3d .product-card-image {
  aspect-ratio: 1;
  background: #f8f9fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid #eef0f4;
}

.product-card-3d .product-card-image .product-condition-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.product-card-3d .product-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.04) 100%);
  pointer-events: none;
}

.product-card-3d .product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.product-card-3d:hover .product-card-image img {
  transform: scale(1.08);
}

.product-card-3d .product-card-placeholder {
  font-size: 3.5rem;
  opacity: 0.5;
}

/* Out of stock overlay */
.product-card-3d.out-of-stock .product-card-image::before {
  content: 'สินค้าหมด';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.product-card-3d.out-of-stock .product-card-image img {
  filter: grayscale(0.5);
}

.product-card-3d.out-of-stock .product-card-cart-btn {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.promo-card.out-of-stock .promo-card-image::before {
  content: 'สินค้าหมด';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.promo-card.out-of-stock .promo-card-image img {
  filter: grayscale(0.5);
}

.promo-card.out-of-stock .product-card-cart-btn {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* Badge มือ1 / มือ2 */
.product-condition-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 0.5rem;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.product-condition-new {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.product-condition-used {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.product-card-3d .product-card-body {
  padding: 1rem;
  position: relative;
  min-height: 6.5rem;
}

.product-card-3d .product-card-body .brand {
  font-size: 0.7rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.product-card-3d .product-card-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-3d .product-card-body .price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--price-color);
}

/* Link wrapper - ครอบทั้ง card */
.product-card-3d .product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* ปุ่มตะกร้าแยกชั้นเหนือการ์ด */
.product-card-3d .product-card-cart-container {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 50;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.product-card-3d .product-card-cart-container .product-card-cart-btn {
  position: relative;
  margin: 0;
  z-index: 51;
}

.product-card-3d .product-card-cart-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ff6b00, #ff8c33);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 50;
  isolation: isolate;
}

.product-card-3d .product-card-cart-btn:hover {
  transform: scale(1.18);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
  background: linear-gradient(135deg, #e55f00, #ff6b00);
}

.product-card-3d .product-card-cart-btn:active {
  transform: scale(0.95);
}

.product-card-3d .product-card-cart-btn.added {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.product-card-3d .product-card-cart-btn--view {
  text-decoration: none;
  background: var(--bg-elevated);
  color: #ff6b00;
  border: 1.5px solid rgba(255, 107, 0, 0.4);
}

.product-card-3d .product-card-cart-btn--view:hover {
  background: rgba(255, 107, 0, 0.08);
  color: #e55f00;
}

/* Section titles */
.section-title-3d {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.section-title-3d .highlight {
  color: #ff6b00;
  -webkit-text-fill-color: #ff6b00;
  background: none;
}

.section-desc-3d {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

/* Brand pills */
.brand-pills-3d {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand-pill-3d {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.25s;
}

.brand-pill-3d:hover {
  color: #ff6b00;
  border-color: rgba(255, 107, 0, 0.4);
  box-shadow: 0 3px 12px rgba(255, 107, 0, 0.12);
  background: rgba(255, 107, 0, 0.04);
}

/* Page titles (ตะกร้า, บัญชี, ออเดอร์ ฯลฯ) */
.theme-it3d .page-title {
  color: var(--text-primary);
}

.theme-it3d .page-subtitle {
  color: var(--text-secondary);
}

/* Footer - Dark navy matching header */
.theme-it3d .footer {
  background: linear-gradient(180deg, #1e2a3a 0%, #151f2e 100%);
  border-top: none;
  color: rgba(255, 255, 255, 0.8);
}

.theme-it3d .footer .footer-logo {
  color: #ffffff;
}

.theme-it3d .footer .footer-logo:hover {
  color: #ff6b00;
}

.theme-it3d .footer .footer-tagline {
  color: rgba(255, 255, 255, 0.5);
}

.theme-it3d .footer .footer-col-title {
  color: rgba(255, 255, 255, 0.45);
}

.theme-it3d .footer .footer-links a {
  color: rgba(255, 255, 255, 0.75);
}

.theme-it3d .footer .footer-links a:hover {
  color: #ff6b00;
}

.theme-it3d .footer .footer-contact li {
  color: rgba(255, 255, 255, 0.6);
}

.theme-it3d .footer .footer-copy {
  color: rgba(255, 255, 255, 0.4);
}

.theme-it3d .footer .footer-legal a {
  color: rgba(255, 255, 255, 0.5);
}

.theme-it3d .footer .footer-legal a:hover {
  color: #ff6b00;
}

.theme-it3d .footer .footer-sep {
  color: rgba(255, 255, 255, 0.25);
}

.theme-it3d .footer .footer-grid {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Form inputs */
.theme-it3d .form-input {
  background: var(--bg-card);
  border-color: #d1d5db;
  color: var(--text-primary);
}

.theme-it3d .form-input:focus {
  border-color: #ff6b00;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

.theme-it3d textarea.form-input {
  background: var(--bg-card);
  border-color: #d1d5db;
  color: var(--text-primary);
}

/* Thai address widget */
.theme-it3d .tai-search {
  background: var(--bg-card) !important;
  border-color: #d1d5db !important;
  color: var(--text-primary) !important;
}

.theme-it3d .tai-suggestions {
  background: var(--bg-card) !important;
  border-color: #e2e8f0 !important;
}

.theme-it3d .tai-suggestions .tai-item {
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.theme-it3d .tai-suggestions .tai-item:hover,
.theme-it3d .tai-suggestions .tai-item.active {
  background: rgba(255, 107, 0, 0.06) !important;
}

.theme-it3d .tai-suggestions .tai-label {
  color: var(--text-primary) !important;
}

.theme-it3d .tai-suggestions .tai-sub {
  color: var(--text-muted) !important;
}

.theme-it3d .tai-suggestions .tai-zip {
  background: rgba(255, 107, 0, 0.1) !important;
  color: #ff6b00 !important;
}

.theme-it3d .tai-loading {
  color: var(--text-muted) !important;
}

.theme-it3d .card {
  background: var(--bg-card);
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Mouse-follow 3D tilt - add data-tilt to card */
[data-tilt] {
  transform-style: preserve-3d;
}

/* Products page filters */
.theme-it3d .main-content {
  position: relative;
  z-index: 1;
}

/* Success/error messages */
.theme-it3d .main-content>div[style*="accent-green"] {
  background: rgba(34, 197, 94, 0.08) !important;
  color: #15803d !important;
  border-color: rgba(34, 197, 94, 0.25) !important;
}

/* Profile dropdown light */
.theme-it3d .profile-menu {
  background: var(--bg-card);
  border-color: #e2e8f0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Empty state */
.theme-it3d .empty-state {
  background: var(--bg-card);
  border: 2px dashed #e2e8f0;
  border-radius: 1.25rem;
}

.theme-it3d .empty-state-icon {
  color: #ff6b00;
}

.theme-it3d .empty-state h3 {
  color: var(--text-primary);
}

.theme-it3d .empty-state p {
  color: var(--text-muted);
}

/* Pagination */
.theme-it3d nav[role="navigation"] a,
.theme-it3d nav[role="navigation"] span {
  background: var(--bg-card);
  border-color: #e2e8f0;
  color: var(--text-secondary);
}

.theme-it3d nav[role="navigation"] a:hover {
  background: rgba(255, 107, 0, 0.06);
  border-color: #ff6b00;
  color: #ff6b00;
}

.theme-it3d nav[role="navigation"] span[aria-current] {
  background: linear-gradient(135deg, #ff6b00, #ff8c33);
  color: #fff;
  border-color: #ff6b00;
}

/* Select dropdown light */
.theme-it3d select.form-input {
  background-color: var(--bg-card);
}

.theme-it3d select.form-input option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ============================================
   AUTH - Login / Register (ธีม IT 3D)
   ============================================ */
.theme-it3d .auth-container {
  max-width: 24rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  position: relative;
  z-index: 1;
}

.theme-it3d .auth-card {
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.theme-it3d .auth-card h1 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.theme-it3d .form-label {
  color: var(--text-secondary);
}

.theme-it3d .auth-card .form-input {
  background: var(--bg-card);
  border-color: #d1d5db;
  color: var(--text-primary);
}

.theme-it3d .auth-card .form-input::placeholder {
  color: var(--text-muted);
}

.theme-it3d .alert-error {
  background: rgba(230, 57, 70, 0.08);
  color: #e63946;
  border: 1px solid rgba(230, 57, 70, 0.2);
}

.theme-it3d .checkbox-group label {
  color: var(--text-secondary);
}

.theme-it3d .auth-links {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.theme-it3d .auth-links a {
  color: #ff6b00;
}

.theme-it3d .auth-links a:hover {
  color: #e55f00;
}

.theme-it3d .auth-links span {
  color: var(--text-muted) !important;
}

/* ============================================
   ACCOUNT PAGES - ธีม IT 3D
   ============================================ */
.account-card-3d {
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.account-card-3d:hover {
  border-color: rgba(255, 107, 0, 0.3);
}

.account-grid-3d {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.account-link-3d {
  display: block;
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.account-link-3d:hover {
  border-color: rgba(255, 107, 0, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.account-link-3d .icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #ff6b00, #ff8c33);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.account-link-3d h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text-primary);
}

.account-link-3d p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.theme-it3d .account-points-hero {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.08), rgba(37, 99, 235, 0.06));
  border: 1px solid rgba(255, 107, 0, 0.2);
  border-radius: 1.25rem;
  padding: 2rem;
  text-align: center;
  color: var(--text-primary);
}

.theme-it3d .account-table th {
  background: rgba(27, 40, 56, 0.06);
  color: var(--text-primary);
  border-color: #e2e8f0;
  font-weight: 700;
}

.theme-it3d .account-table td {
  border-color: #eef0f4;
  color: var(--text-secondary);
}

.theme-it3d .account-success-msg {
  background: rgba(34, 197, 94, 0.08);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

/* Returns page - row links */
.returns-row-3d {
  display: block;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.2s;
}

.returns-row-3d:last-child {
  border-bottom: none;
}

.returns-row-3d:hover {
  background: rgba(255, 107, 0, 0.04);
}

/* Return status badges for light theme */
.theme-it3d .order-badge--pending {
  background: rgba(251, 191, 36, 0.25);
  color: #b45309;
}

.theme-it3d .order-badge--approved {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.theme-it3d .order-badge--rejected {
  background: rgba(219, 39, 119, 0.15);
  color: #be185d;
}

.theme-it3d .order-badge--received {
  background: rgba(139, 92, 246, 0.2);
  color: #6d28d9;
}

.theme-it3d .order-badge--refunded {
  background: rgba(34, 197, 94, 0.2);
  color: #15803d;
}

.theme-it3d .order-badge--completed {
  background: rgba(34, 197, 94, 0.2);
  color: #15803d;
}

/* ============================================
   PRODUCT DETAIL 3D
   ============================================ */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (max-width: 991px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
  }
}

.product-gallery-3d {
  position: relative;
  background: #f8f9fb;
  border-right: 1px solid #eef0f4;
}

.main-image-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-dark);
}

.main-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.main-image-wrap:hover img {
  transform: scale(1.05);
}

.thumb-gallery {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.thumb-item {
  width: 70px;
  height: 70px;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  flex-shrink: 0;
  background: var(--bg-dark);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.thumb-item:hover img,
.thumb-item.active img {
  opacity: 1;
}

.thumb-item.active {
  border-color: #ff6b00;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.2);
}

.product-info-3d {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.brand-tag {
  font-size: 0.8rem;
  color: #2563eb;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-name-3d {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.product-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.warranty-badge {
  font-size: 0.8125rem;
  padding: 0.25rem 0.75rem;
  background: rgba(34, 197, 94, 0.08);
  color: #15803d;
  border-radius: 0.5rem;
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-weight: 600;
}

.category-pills {
  display: flex;
  gap: 0.5rem;
}

.category-pills a {
  font-size: 0.75rem;
  background: rgba(27, 40, 56, 0.04);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.category-pills a:hover {
  background: rgba(255, 107, 0, 0.06);
  color: #ff6b00;
  border-color: rgba(255, 107, 0, 0.4);
}

.price-wrap-3d {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.main-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--price-color);
  text-shadow: none;
}

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

.discount-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.product-description-3d {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1rem;
}

.product-actions-3d {
  background: #f8f9fb;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
}

.qty-add-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.qty-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: rgba(255, 107, 0, 0.08);
}

.qty-field {
  width: 50px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-field::-webkit-inner-spin-button,
.qty-field::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.add-to-cart-btn {
  flex: 1;
  min-width: 200px;
  padding: 0 2rem;
  height: 46px;
  font-weight: 700;
  font-size: 1rem;
}

.product-share-3d {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.share-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.share-icons {
  display: flex;
  gap: 0.75rem;
}

.share-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6f8;
  color: var(--text-secondary);
  border: 1px solid #e2e8f0;
  transition: all 0.3s;
  text-decoration: none;
}

.share-icon:hover {
  transform: translateY(-3px);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.share-icon.fb:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.share-icon.line:hover {
  background: #00b900;
  border-color: #00b900;
}

.share-icon.copy:hover {
  background: #ff6b00;
  color: #fff;
  border-color: #ff6b00;
}

.placeholder-wrap {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
}

/* ============================================
   PROMOTIONS — Shared Card & Countdown Styles
   ============================================ */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.promo-card {
  position: relative;
  background: var(--bg-card, #fff);
  border: 1px solid #e8eaed;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.promo-card:hover {
  border-color: rgba(255,107,0,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.promo-discount-badge {
  position: absolute;
  top: auto;
  right: 0.75rem;
  background: linear-gradient(135deg, #e63946, #ff4757);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(230,57,70,0.4);
}

.promo-card-image .promo-discount-badge {
  top: 0.5rem;
  right: 0.5rem;
}

.promo-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #1B2838, #2a3a4d);
  border-bottom: 2px solid #ff6b00;
}

.promo-countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
}

.promo-cd-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ff6b00;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.promo-cd-label {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.promo-cd-sep {
  color: rgba(255,255,255,0.3);
  font-weight: 700;
  font-size: 1rem;
  margin-top: -0.5rem;
}

.promo-countdown.expired {
  background: #4a1a1a;
  border-color: #e63946;
}

.promo-countdown.expired .promo-cd-num {
  color: #e63946;
}

.promo-card-image {
  display: block;
  aspect-ratio: 1;
  background: #f8f9fb;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #eef0f4;
}

.promo-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.23,1,0.32,1);
}

.promo-card:hover .promo-card-image img {
  transform: scale(1.08);
}

.promo-card-body {
  padding: 1rem;
  padding-bottom: 3rem;
}

.promo-card-body .brand {
  font-size: 0.7rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.promo-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.promo-card-title:hover {
  color: #ff6b00;
}

.promo-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.promo-price-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--price-color, #e63946);
}

.promo-price-original {
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  text-decoration: line-through;
}

.promo-save-tag {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #16a34a;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 0.25rem;
}

.promo-card-action {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 10;
}

.promo-card-action .product-card-cart-btn {
  position: static;
}

/* ============================================
   MOBILE HEADER ACTIONS (cart + hamburger wrapper)
   ============================================ */
.mobile-header-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.mobile-cart-btn {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  text-decoration: none;
  background: rgba(255, 107, 0, 0.15);
  border: 1px solid rgba(255, 107, 0, 0.4);
  border-radius: 0.625rem;
  transition: background 0.2s;
}

.mobile-cart-btn:hover {
  background: rgba(255, 107, 0, 0.25);
}

.mobile-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6b00, #ff8c33);
  color: #fff;
  border-radius: 9999px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(255, 107, 0, 0.4);
}

/* ============================================
   MOBILE MENU BUTTON (hamburger)
   ============================================ */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  cursor: pointer;
  padding: 0;
  z-index: 110;
  transition: background 0.2s;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* Hamburger → X animation */
.mobile-nav-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-nav-open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-nav-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================ */
@media (max-width: 1024px) {
  .main-content {
    padding: 1.5rem 1rem;
  }

  .hero-it3d {
    padding: 3rem 1.5rem 3.5rem;
    margin-bottom: 2rem;
  }

  .hero-it3d h1 {
    font-size: 2.25rem;
  }

  .section-title-3d {
    font-size: 1.75rem;
  }

  .product-detail-grid {
    gap: 0;
  }

  .product-info-3d {
    padding: 2rem 1.5rem;
  }

  .product-name-3d {
    font-size: 1.75rem;
  }
}

/* ============================================
   RESPONSIVE — MOBILE NAV (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
  /* Sticky header on mobile */
  .header {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  /* Show mobile header actions (cart + hamburger) */
  .mobile-header-actions {
    display: flex;
  }

  .mobile-cart-btn {
    display: flex;
  }

  /* Header layout */
  .theme-it3d .header-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 0.6rem 1rem;
  }

  /* Nav becomes slide-out panel */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100dvh;
    background: #1B2838;
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.25rem 2rem;
    gap: 0.25rem;
    z-index: 100;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
  }

  .mobile-nav-open .nav-links {
    right: 0;
  }

  /* Overlay behind nav */
  .mobile-nav-open .header::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
  }

  /* Nav links stack vertically */
  .nav-links .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    width: 100%;
  }

  /* Cart link in mobile nav */
  .theme-it3d .header .nav-links a.cart-link {
    justify-content: flex-start;
    width: 100%;
    border-radius: 0.5rem !important;
  }

  .theme-it3d .header .nav-links a.cart-link .cart-link-text {
    display: inline;
  }

  /* Profile in mobile nav */
  .profile-dropdown {
    width: 100%;
  }

  .profile-trigger {
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem 1rem !important;
    border-radius: 0.5rem !important;
  }

  .profile-menu {
    position: static !important;
    width: 100% !important;
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 0.5rem !important;
    margin-top: 0.25rem;
  }

  .profile-dropdown.open .profile-menu {
    transform: none;
  }

  .profile-menu-item {
    color: rgba(255, 255, 255, 0.8) !important;
  }

  .profile-menu-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
  }

  .profile-menu-name {
    color: #fff !important;
  }

  .profile-menu-email {
    color: rgba(255, 255, 255, 0.5) !important;
  }

  .profile-menu-divider {
    background: rgba(255, 255, 255, 0.1) !important;
  }

  /* Auth buttons in mobile nav */
  .nav-links .btn.btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }

  /* Hero */
  .hero-it3d {
    padding: 2.5rem 1.25rem 3rem;
    border-radius: 0;
    margin-left: -1rem;
    margin-right: -1rem;
    margin-bottom: 1.5rem;
  }

  .hero-it3d h1 {
    font-size: 1.75rem;
  }

  .hero-it3d p {
    font-size: 0.95rem;
  }

  .hero-it3d .hero-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.75rem;
  }

  /* Section titles */
  .section-title-3d {
    font-size: 1.5rem;
  }

  .section-desc-3d {
    font-size: 0.875rem;
  }

  /* Category grid */
  .cat-grid-3d {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .cat-card-3d {
    padding: 1rem;
  }

  .cat-card-3d .cat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .cat-card-3d .cat-name {
    font-size: 0.8rem;
  }

  /* Product grid */
  .product-grid-3d {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .product-card-3d {
    max-width: none;
  }

  .product-card-3d .product-card-body {
    padding: 0.75rem;
  }

  .product-card-3d .product-card-body h3 {
    font-size: 0.85rem;
  }

  .product-card-3d .product-card-body .price {
    font-size: 1.05rem;
  }

  .product-card-3d .product-card-body .brand {
    font-size: 0.65rem;
  }

  /* Cart button on product card — prevent overlap */
  .product-card-3d .product-card-body {
    padding-bottom: 2.75rem !important;
  }

  .product-card-3d .product-card-body .price-row {
    flex-direction: column;
    gap: 0 !important;
  }

  .product-card-3d .product-card-body .price-row .price-original {
    font-size: 0.7rem !important;
  }

  .product-card-3d .product-card-cart-container {
    width: 32px !important;
    height: 32px !important;
    bottom: 0.5rem !important;
    right: 0.5rem !important;
  }

  .product-card-3d .product-card-cart-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.9rem !important;
    bottom: 0.5rem !important;
    right: 0.5rem !important;
  }

  /* Promo cards mobile */
  .promo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .promo-card-body {
    padding: 0.75rem;
    padding-bottom: 2.75rem;
  }

  .promo-card-title {
    font-size: 0.85rem;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .promo-price-current {
    font-size: 1.05rem;
  }

  .promo-price-original {
    font-size: 0.7rem;
  }

  .promo-discount-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }

  .promo-countdown {
    padding: 0.4rem 0.5rem;
    gap: 0.15rem;
  }

  .promo-countdown-item {
    min-width: 28px;
  }

  .promo-cd-num {
    font-size: 0.85rem;
  }

  .promo-cd-label {
    font-size: 0.45rem;
  }

  .promo-cd-sep {
    font-size: 0.75rem;
  }

  .promo-save-tag {
    font-size: 0.6rem;
  }

  .promo-card-action .product-card-cart-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.9rem !important;
  }

  /* Brand pills */
  .brand-pills-3d {
    gap: 0.5rem;
  }

  .brand-pill-3d {
    font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
  }

  /* Filter card on products page */
  .card[style*="padding:1.5rem"] {
    padding: 1rem !important;
  }

  .card .flex.gap-4 {
    flex-direction: column;
    gap: 0.75rem !important;
  }

  /* Product detail page */
  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .product-gallery-3d {
    border-right: none;
    border-bottom: 1px solid #eef0f4;
  }

  .product-info-3d {
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

  .product-name-3d {
    font-size: 1.5rem;
  }

  .main-price {
    font-size: 1.5rem;
  }

  .qty-add-row {
    flex-direction: column;
  }

  .add-to-cart-btn {
    min-width: 100%;
  }

  /* Thumbnails row */
  .thumbs-row {
    gap: 0.4rem;
    padding: 0.5rem;
  }

  .thumb-item {
    width: 52px;
    height: 52px;
  }

  /* Account pages */
  .account-grid-3d {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .account-card-3d {
    padding: 1rem;
  }

  .account-link-3d {
    padding: 1rem;
  }

  .account-link-3d .icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  /* Footer — organized mobile layout */
  .footer-inner {
    padding: 2rem 1.25rem 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.25rem;
  }

  .footer-col {
    text-align: left;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem;
  }

  /* Auth pages */
  .theme-it3d .auth-container {
    padding: 2rem 1rem;
  }

  .theme-it3d .auth-card {
    padding: 1.75rem 1.25rem;
  }

  /* Pagination */
  nav[role="navigation"] {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Checkout page: 2-col grid → stacked */
  form > div[style*="grid-template-columns:1fr 380px"] {
    grid-template-columns: 1fr !important;
  }

  /* Checkout name/phone 2-col → stacked */
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Cart summary buttons */
  #cart-items div[style*="justify-content:flex-end"] {
    flex-direction: column;
  }

  #cart-items div[style*="justify-content:flex-end"] .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Cart total text */
  #cart-items div[style*="font-size:1.5rem"] {
    font-size: 1.15rem !important;
  }

  #cart-items #cart-subtotal {
    font-size: 1.5rem !important;
  }

  /* Order card layout */
  .card[style*="padding:1.5rem 2rem"] > div[style*="justify-content:space-between"] {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem !important;
  }

  /* Order card right section */
  .card[style*="padding:1.5rem 2rem"] div[style*="gap:2rem"] {
    width: 100%;
    justify-content: space-between;
    gap: 1rem !important;
  }

  /* Page titles */
  .page-title {
    font-size: 1.5rem !important;
  }

  .page-subtitle {
    font-size: 0.875rem;
  }

  /* Order detail page: 2-col grid → stacked */
  div[style*="grid-template-columns:1fr 380px"] {
    grid-template-columns: 1fr !important;
  }

  /* Order detail 3-col info grid */
  div[style*="grid-template-columns: 1fr 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Slip upload flex → stack */
  div[style*="display:flex"] > div[style*="flex:1"] + .btn {
    min-width: 100%;
  }

  /* Bank account cards: ensure min-width fits */
  div[style*="minmax(300px"] {
    grid-template-columns: 1fr !important;
  }

  /* Table horizontal scroll hint */
  div[style*="overflow-x:auto"] {
    -webkit-overflow-scrolling: touch;
  }

  /* Summary card sticky → static on mobile */
  .card[style*="position:sticky"] {
    position: static !important;
  }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================ */
@media (max-width: 480px) {
  .main-content {
    padding: 1rem 0.75rem;
  }

  /* Hero */
  .hero-it3d {
    padding: 2rem 1rem 2.5rem;
  }

  .hero-it3d h1 {
    font-size: 1.4rem;
  }

  .hero-it3d p {
    font-size: 0.875rem;
  }

  .hero-it3d .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
  }

  /* Section */
  .section-title-3d {
    font-size: 1.25rem;
  }

  /* Category grid — 3 cols */
  .cat-grid-3d {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .cat-card-3d {
    padding: 0.75rem 0.5rem;
  }

  .cat-card-3d .cat-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .cat-card-3d .cat-name {
    font-size: 0.7rem;
  }

  .cat-card-3d .cat-count {
    display: none;
  }

  /* Product grid — 2 cols tight */
  .product-grid-3d {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .product-card-3d .product-card-body {
    padding: 0.6rem;
    padding-bottom: 2.25rem !important;
  }

  .product-card-3d .product-card-body h3 {
    font-size: 0.78rem;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .product-card-3d .product-card-body .price {
    font-size: 0.9rem;
  }

  .product-card-3d .product-card-body .price-row .price-original {
    font-size: 0.65rem !important;
  }

  .product-card-3d .product-card-cart-container {
    width: 28px !important;
    height: 28px !important;
    bottom: 0.35rem !important;
    right: 0.35rem !important;
  }

  .product-card-3d .product-card-cart-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.75rem !important;
    bottom: 0.35rem !important;
    right: 0.35rem !important;
  }

  .product-condition-badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    top: 0.4rem;
    left: 0.4rem;
  }

  /* Product detail */
  .product-info-3d {
    padding: 1rem 0.75rem;
  }

  .product-name-3d {
    font-size: 1.25rem;
  }

  .main-price {
    font-size: 1.35rem;
  }

  .product-actions-3d {
    padding: 1rem;
  }

  /* Share icons */
  .product-share-3d {
    flex-wrap: wrap;
  }

  .share-icon {
    width: 34px;
    height: 34px;
  }

  /* Account grid — single col */
  .account-grid-3d {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .account-link-3d h3 {
    font-size: 0.85rem;
  }

  .account-link-3d p {
    font-size: 0.7rem;
  }

  /* Footer */
  .footer-tagline {
    font-size: 0.8rem;
  }

  .footer-col-title {
    font-size: 0.85rem;
  }

  .footer-links li a {
    font-size: 0.8rem;
  }

  /* Logo smaller */
  .theme-it3d .logo {
    font-size: 1.15rem;
  }

  .theme-it3d .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
}

/* ============================================
   RESPONSIVE — VERY SMALL (≤ 360px)
   ============================================ */
@media (max-width: 360px) {
  .product-grid-3d {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .product-card-3d .product-card-body {
    padding: 0.5rem;
  }

  .product-card-3d .product-card-body .brand {
    display: none;
  }

  .cat-grid-3d {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-it3d h1 {
    font-size: 1.2rem;
  }

  .account-grid-3d {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
/* Prevent body scroll when mobile nav is open */
.mobile-nav-open {
  overflow: hidden;
}

/* Close mobile nav when clicking overlay */
.mobile-nav-open .header::after {
  cursor: pointer;
}

/* Hide cart text on very small inline contexts */
@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none !important;
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Touch-friendly tap targets */
@media (pointer: coarse) {
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .btn {
    min-height: 44px;
  }

  .product-card-cart-btn {
    min-width: 40px;
    min-height: 40px;
  }
}