:root {
  --bg: #2e2f38;
  --bg-soft: #3a3b46;
  --card: #343642;
  --text: #f7f8ff;
  --text-muted: #d0d2e4;
  --accent: #ff2bd1;
  --accent-2: #ff77e8;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 60px rgba(10, 10, 18, 0.45);
  --footer-bg: #242632;
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1180px;
  --font-body: "Hanken Grotesk", "Segoe UI", sans-serif;
  --font-heading: "Space Grotesk", "Segoe UI", sans-serif;
  --z-header: 1200;
  --z-menu: 1300;
  --z-modal: 5000;
  --z-welcome: 5100;
  --z-tooltip: 2200;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(circle at top, #3b3d49 0%, #2b2d38 45%, #22232c 100%);
  min-height: 100vh;
}

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

img {
  width: 100%;
  display: block;
}

.page {
  position: relative;
  overflow: hidden;
}

.topbar {
  background: linear-gradient(90deg, #ff2bd1, #ff77e8);
  color: #ffffff;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  letter-spacing: 0.03em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  pointer-events: auto;
  background: rgba(15, 11, 18, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  min-height: 86px;
}

/* Make sure account icon and its wrapper are above everything and receive pointer events */
.user-menu-wrapper,
.header-actions .icon-btn,
.header-inner {
  position: relative;
  z-index: calc(var(--z-header) + 1);
  pointer-events: auto;
}

.user-menu {
  z-index: var(--z-menu);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: nowrap;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  flex: 0 0 auto;
}

.nav {
  display: flex;
  justify-content: flex-start;
  gap: 1.2rem;
  font-weight: 500;
  color: var(--text-muted);
  flex-wrap: nowrap;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-left: 0.6rem;
  min-width: 0;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  position: relative;
  padding-bottom: 0.2rem;
  font-size: 0.92rem;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  width: 100%;
}

.header-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.user-menu-wrapper {
  position: relative;
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: var(--z-menu);
  pointer-events: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 200px;
  margin-top: 0.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.user-menu[hidden] {
  display: none;
}

.user-menu-item {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--border);
}

.user-menu-item:last-child {
  border-bottom: none;
}

.user-menu-item:hover {
  background: rgba(255, 43, 209, 0.1);
  color: var(--accent);
}

.user-menu-item[hidden] {
  display: none;
}

/* Welcome modal */
.welcome-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 12, 0.55);
  display: grid;
  place-items: center;
  z-index: var(--z-welcome);
  padding: 1.5rem;
}

.welcome-modal__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  width: min(360px, 90vw);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.8rem;
  text-align: center;
}

.welcome-modal__card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.welcome-modal__card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.icon-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--text);
  transition: transform 0.2s ease, border 0.2s ease;
  position: relative;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  background: var(--card);
  padding: 0;
  gap: 0.3rem;
  place-items: center;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.hero {
  padding: 4rem 1.5rem 3rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 3vw, 3.8rem);
  line-height: 1;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.subcopy {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 38ch;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #ff2bd1, #ff77e8);
  color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(15, 28, 46, 0.3);
  color: var(--text);
}

.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn.full {
  width: 100%;
}

.hero-visual {
  display: grid;
  gap: 1.5rem;
}

.hero-stack {
  display: grid;
  grid-template-rows: auto auto;
  gap: 1.4rem;
}

.hero-slider {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 360px;
}

.hero-slider .hero-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.hero-slider .hero-remove:hover { opacity: 1; transform: scale(1.05); }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-slide.is-active {
  opacity: 1;
  position: absolute;
  inset: 0;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08), rgba(0,0,0,0.25));
  display: block;
}

.hero-slide-meta {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 1.2rem 1.5rem;
  background: linear-gradient(0deg, rgba(20, 18, 28, 0.8), rgba(20, 18, 28, 0));
  color: #fff;
}

.hero-slide-meta .price {
  margin-top: 0.15rem;
  font-weight: 700;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  opacity: 0.98;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  z-index: 5;
}

.hero-nav:hover { transform: translateY(-50%) scale(1.08); }
.hero-nav.prev { left: 12px; }
.hero-nav.next { right: 12px; }

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  opacity: 0.6;
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fff;
  opacity: 1;
}

.hero-admin-uploader {
  margin-top: 1rem;
  display: grid;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0.75rem;
}

.hero-admin-uploader .uploader-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.hero-admin-uploader input[type="text"],
.hero-admin-uploader input[type="file"] {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0.5rem 0.8rem;
  background: var(--card);
  color: var(--text);
}

/* Vista admin: reducir slider para dejar sitio al panel */
.is-admin .hero-inner {
  grid-template-columns: 1.1fr 0.9fr;
}

.is-admin .hero-slider {
  min-height: 260px;
}

.is-admin .hero-slide-meta {
  padding: 0.9rem 1rem;
}

/* Vista usuario: slider grande y sin uploader visible */
body:not(.is-admin) .hero-slider {
  min-height: 420px;
}
body:not(.is-admin) .hero-admin-uploader {
  display: none;
}

.hero-uploader {
  max-width: var(--max-width);
  margin: -0.5rem auto 3rem;
  padding: 0 1.5rem;
}

.hero-uploader__card {
  background: linear-gradient(135deg, rgba(255,43,209,0.06), rgba(255,119,232,0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  display: grid;
  gap: 0.9rem;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

.hero-uploader__heading {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 43, 209, 0.12);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 43, 209, 0.25);
}

.hero-uploader__card .uploader-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.hero-uploader__card input[type="text"],
.hero-uploader__card input[type="file"] {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  background: var(--card);
  color: var(--text);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 18, 0.58);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: var(--z-modal);
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  background: linear-gradient(145deg, #0f111a, #151829);
  color: #f5f6fb;
  border-radius: 20px;
  padding: 1.6rem;
  max-width: 820px;
  width: min(820px, 100%);
  max-height: 90vh;
  overflow: auto;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: popIn 220ms ease-out;
  margin: 0 auto;
}

.modal-card h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.modal-card .muted {
  color: #9ba0b5;
  margin-bottom: 1rem;
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 150ms ease, transform 150ms ease;
}
.modal-close:hover {
  background: rgba(255, 43, 209, 0.12);
  transform: scale(1.05);
}

.modal-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.modal-block {
  background: #10121c;
  padding: 1rem;
  border-radius: 14px;
  display: grid;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.modal-block h4 {
  margin: 0 0 0.35rem 0;
}

.field-label {
  font-size: 0.85rem;
  color: #9ba0b5;
}

.modal-block input[type='text'],
.modal-block input[type='file'] {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0c0e16;
  color: #dfe2f1;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
}

.modal-block input[type='text']::placeholder {
  color: #7f86a3;
}

.modal-block input[type='file']::-webkit-file-upload-button,
.modal-block input[type='file']::file-selector-button {
  background: linear-gradient(135deg, #ff3abf, #ff6df2);
  color: #0c0e16;
  border: none;
  padding: 0.55rem 0.9rem;
  margin-right: 0.65rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 8px 20px rgba(255, 58, 191, 0.35);
}

.modal-block input[type='file']::-webkit-file-upload-button:hover,
.modal-block input[type='file']::file-selector-button:hover {
  transform: translateY(-1px);
}

.modal-block input[type='file']::-webkit-file-upload-button:active,
.modal-block input[type='file']::file-selector-button:active {
  transform: translateY(0);
}

.modal-block .full {
  width: 100%;
  justify-content: center;
}

.multi-list {
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem;
  background: #0e1019;
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 0.75rem;
}

.multi-item {
  background: #121424;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.multi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.modal-open {
  overflow: hidden;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-tabs {
  display: inline-flex;
  gap: 0.5rem;
  margin: 0.6rem 0 1rem;
  background: rgba(255,255,255,0.04);
  padding: 0.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}

.tab-btn {
  border: none;
  background: transparent;
  color: #dfe2f1;
  padding: 0.55rem 0.85rem;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
  transition: background 140ms ease, color 140ms ease;
}

.tab-btn.is-active {
  background: linear-gradient(135deg, #ff3abf, #ff6df2);
  color: #0c0e16;
}

.modal-tabpanes {
  display: grid;
  gap: 1rem;
}

.modal-pane textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0c0e16;
  color: #dfe2f1;
  padding: 0.75rem;
  font-family: inherit;
}

.admin-upload-btn {
  margin-top: 0.75rem;
  display: inline-flex;
  visibility: hidden;
}

.category-bulk-controls {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.category-bulk-controls__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.category-bulk-controls__count {
  font-size: 0.95rem;
  color: var(--muted);
}

.product-modal {
  width: min(1020px, 100%);
  max-height: none;
  overflow: visible;
}

.modal-overlay[data-product-modal] {
  align-items: flex-start;
  overflow-y: auto;
  padding: 1rem;
}

.product-modal__header h3 {
  font-size: clamp(1.4rem, 2vw, 1.9rem);
}

.product-modal__header .muted {
  max-width: 70ch;
  line-height: 1.5;
}

.product-form-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-field {
  display: grid;
  gap: 0.35rem;
}

.product-field--wide {
  grid-column: 1 / -1;
}

.product-field input,
.product-field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0f18;
  color: #e6e8f5;
  padding: 0.7rem 0.8rem;
  font-family: inherit;
}

.product-field textarea {
  resize: vertical;
  min-height: 84px;
}

.field-hint {
  color: #9ba0b5;
  font-size: 0.78rem;
}

.product-field input:focus,
.product-field textarea:focus {
  outline: none;
  border-color: rgba(255, 76, 219, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 76, 219, 0.14);
}

.product-form-actions {
  margin-top: 0.8rem;
}

.option-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.option-chip-grid .field-hint {
  width: 100%;
}

.option-chip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 13, 23, 0.85);
  color: #dfe2f1;
  padding: 0.42rem 0.78rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.option-chip:hover {
  border-color: rgba(255, 84, 223, 0.55);
}

.option-chip.is-active {
  border-color: rgba(255, 84, 223, 0.85);
  background: linear-gradient(135deg, #ff3abf, #ff6df2);
  color: #0c0e16;
}

.option-chip.is-current {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.size-stock-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.size-stock-item {
  display: grid;
  gap: 0.3rem;
}

.size-stock-item span {
  font-size: 0.8rem;
  color: #b5bddb;
  font-weight: 600;
}

.size-stock-item input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0f18;
  color: #e6e8f5;
  padding: 0.55rem 0.65rem;
  font-family: inherit;
}

.size-stock-item input:focus {
  outline: none;
  border-color: rgba(255, 76, 219, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 76, 219, 0.14);
}

.product-toggle {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #d3d8ee;
  font-weight: 600;
}

.password-modal-card {
  max-width: 430px;
  width: min(430px, 100%);
}

.password-modal-form {
  display: grid;
  gap: 0.5rem;
}

.password-modal-form input[type='password'] {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0c0e16;
  color: #dfe2f1;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
}

.password-modal-form input[type='password']::placeholder {
  color: #7f86a3;
}

.password-modal-form .btn {
  margin-top: 0.35rem;
}

.user-orders-modal-card {
  max-width: 760px;
  width: min(760px, 100%);
}

.user-orders-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.user-orders-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.18rem;
}

.user-orders-stat span {
  font-size: 0.78rem;
  color: #9ba0b5;
}

.user-orders-stat strong {
  font-size: 1rem;
  color: #fff;
}

.user-orders-list {
  display: grid;
  gap: 0.65rem;
  max-height: 56vh;
  overflow: auto;
  padding-right: 0.15rem;
}

.user-order-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem;
  display: grid;
  gap: 0.45rem;
}

.user-order-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
}

.user-order-head strong {
  font-size: 0.9rem;
  word-break: break-word;
}

.user-order-head span {
  font-size: 0.82rem;
  color: #9ba0b5;
}

.user-order-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.8);
}

.user-order-totals strong {
  color: #fff;
}

.product-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff3abf;
}

.product-batch-intro {
  margin-top: 0;
}

.product-batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.product-batch-import {
  position: relative;
  overflow: hidden;
}

.product-batch-import input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.product-batch-count {
  margin-left: auto;
  color: #9fa7c6;
  font-size: 0.92rem;
}

.batch-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.65rem;
  max-height: none;
  overflow: visible;
  padding-right: 0.2rem;
}

.batch-row {
  background: linear-gradient(145deg, rgba(17, 21, 36, 0.95), rgba(13, 16, 28, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.85rem;
  display: grid;
  gap: 0.8rem;
}

.batch-row__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.batch-row__header strong {
  display: block;
  font-size: 1rem;
}

.batch-row__header small {
  color: #96a1c4;
}

.batch-row__body {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.85rem;
  align-items: start;
}

.batch-row__preview-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #0a0d16;
  aspect-ratio: 4 / 5;
}

.batch-row__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-row .row-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.batch-row .row-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.6rem;
}

.row-description {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0f18;
  color: #e6e8f5;
  padding: 0.7rem 0.8rem;
  font-family: inherit;
  resize: vertical;
}

.row-file-btn {
  position: relative;
  overflow: hidden;
}

.row-file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.product-description {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.product-stock {
  margin-top: 0.2rem;
  font-size: 0.9rem;
  color: #8be1c8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}

.product-stock-main {
  color: #a7fbe0;
}

.product-stock strong {
  color: #75ffd0;
  font-weight: 800;
}

.product-stock-total {
  color: #9be7cf;
  font-size: 0.82rem;
}

.product-colors {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: #9ba0b5;
}

.newsletter {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  padding: 1.4rem 1.6rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(120deg, rgba(255, 43, 209, 0.12), rgba(255, 119, 232, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.newsletter__text h3 {
  font-family: var(--font-heading);
  margin: 0.1rem 0 0.35rem;
}

.newsletter__text p {
  color: var(--text-muted);
}

.newsletter__form {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.newsletter__form input {
  flex: 1 1 220px;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.75rem 0.9rem;
  background: #fff;
  color: var(--text);
}

.collections {
  padding: 1rem 1.5rem 5rem;
}

.section-heading {
  max-width: var(--max-width);
  margin: 0 auto 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
}

.section-heading p {
  color: var(--text-muted);
  max-width: 34ch;
}

.collection-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.collection-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(21, 45, 90, 0.12);
  transition: transform 0.3s ease, border 0.3s ease;
}

.collection-card:hover,
.collection-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.25);
}

.collection-card img {
  height: 280px;
  object-fit: contain;
  background: #5b5b5f;
  padding: 0.6rem;
  filter: saturate(1.05);
  transition: transform 0.4s ease;
}

.collection-card:hover img,
.collection-card:focus-visible img {
  transform: scale(1.05);
}

.collection-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(0deg, rgba(38, 16, 36, 0.85), rgba(38, 16, 36, 0));
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #ffffff;
}

.collection-info svg {
  width: 20px;
  height: 20px;
}

.products {
  padding: 1rem 1.5rem 5rem;
}

.category-hero {
  padding: 3rem 1.5rem 1rem;
  background: linear-gradient(120deg, rgba(255, 43, 209, 0.14), rgba(255, 119, 232, 0.08));
  border-bottom: 1px solid var(--border);
}

.category-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.category-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 0.8rem;
}

.filters {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.filter-input,
.filter-select {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.7rem 1rem;
  background: var(--card);
  color: var(--text);
}

.filter-select {
  appearance: none;
}

.product-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.8rem;
  height: 100%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.product-delete-icon {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 13, 25, 0.88);
  color: #fff;
  font-size: 1.28rem;
  line-height: 1;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 8.5px;
  text-align: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.product-delete-icon:hover {
  background: #ff3b8c;
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.product-select-icon {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  padding: 9px;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 13, 25, 0.88);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  font-weight: 800;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.product-select-icon:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.product-select-icon.is-active {
  background: linear-gradient(135deg, #ff32d6, #ff5ab2);
  border-color: rgba(255, 255, 255, 0.38);
}

.product-card.is-bulk-selecting {
  outline: 1px dashed rgba(255, 79, 218, 0.26);
  outline-offset: 4px;
}

.product-card.is-bulk-selected {
  box-shadow: 0 0 0 3px rgba(255, 79, 218, 0.24);
}

.product-card img {
  height: 230px;
  object-fit: contain;
  background: #5b5b5f;
  padding: 0.6rem;
}

.product-media {
  position: relative;
}

.product-media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(8, 10, 20, 0.75);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.product-media-nav.prev {
  left: 0.45rem;
}

.product-media-nav.next {
  right: 0.45rem;
}

.product-media-nav:hover {
  background: rgba(255, 58, 145, 0.92);
  border-color: rgba(255, 255, 255, 0.55);
}

.product-media-counter {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(6, 9, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  z-index: 3;
}

.product-media,
[data-product-image] {
  cursor: zoom-in;
}

.product-info {
  padding: 1.2rem 1.2rem 1.4rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.product-info h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.product-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.product-variants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: start;
}

.variant-field {
  display: grid;
  gap: 0.25rem;
  align-content: start;
  align-self: start;
}

.variant-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.variant-select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f1322;
  color: var(--text);
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.variant-size-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-items: flex-start;
  align-content: flex-start;
}

.variant-size-btn {
  position: relative;
  min-width: 2.6rem;
  padding: 0.4rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0f1322;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.variant-size-btn:hover:not(:disabled),
.variant-size-btn:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.46);
}

.variant-size-btn.is-active {
  background: linear-gradient(135deg, rgba(255, 43, 209, 0.9), rgba(255, 119, 232, 0.92));
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}

.variant-size-btn.is-disabled,
.variant-size-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  text-decoration: line-through;
}

.variant-size-btn.is-disabled::after,
.variant-size-btn:disabled::after {
  content: '';
  position: absolute;
  left: 0.38rem;
  right: 0.38rem;
  top: 50%;
  border-top: 2px solid rgba(255, 120, 158, 0.88);
  transform: rotate(-16deg);
}

.variant-color-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-items: flex-start;
  align-content: flex-start;
}

.variant-color-btn {
  min-width: 3.1rem;
  padding: 0.4rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0f1322;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.variant-color-btn:hover,
.variant-color-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.46);
}

.variant-color-btn.is-active {
  background: linear-gradient(135deg, rgba(255, 43, 209, 0.9), rgba(255, 119, 232, 0.92));
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}

.variant-color-btn.is-disabled,
.variant-color-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: line-through;
}

.variant-matrix-grid {
  display: grid;
  gap: 0.55rem;
}

.variant-matrix-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.45rem;
}

.variant-matrix-item {
  display: grid;
  gap: 0.3rem;
}

.variant-matrix-item span {
  font-size: 0.78rem;
  color: #b5bddb;
  font-weight: 600;
}

.variant-matrix-item input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0f18;
  color: #e6e8f5;
  padding: 0.55rem 0.65rem;
  font-family: inherit;
}

.variant-matrix-item input:focus {
  outline: none;
  border-color: rgba(255, 76, 219, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 76, 219, 0.14);
}

.product-meta-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.admin-only {
  display: none !important;
}

body.is-admin .admin-only {
  display: inline-flex !important;
}

body:not(.is-admin) .admin-tabs,
body:not(.is-admin) .admin-float,
body:not(.is-admin) .admin-float-body,
body:not(.is-admin) .admin-panel-section,
body:not(.is-admin) .admin-body {
  display: none !important;
}

.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  background: rgba(7, 10, 20, 0.62);
  backdrop-filter: blur(2px);
}

.app-loading-overlay[hidden] {
  display: none !important;
}

.app-loading-card {
  min-width: 240px;
  max-width: min(92vw, 360px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 1rem 1.2rem;
  background: linear-gradient(140deg, rgba(18, 24, 45, 0.98), rgba(33, 28, 48, 0.96));
  color: #f3f5ff;
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.app-loading-card p {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.app-loading-spinner {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ff4fda;
  animation: appLoadingSpin 700ms linear infinite;
}

body.is-busy {
  cursor: progress;
}

@keyframes appLoadingSpin {
  to {
    transform: rotate(360deg);
  }
}

.product-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 3600;
  background: rgba(5, 8, 18, 0.84);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.product-zoom-modal[hidden] {
  display: none !important;
}

.product-zoom-modal__dialog {
  position: relative;
  width: min(96vw, 980px);
  max-height: 94vh;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(24, 29, 48, 0.98), rgba(15, 20, 36, 0.96));
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(240px, 78vh) auto;
}

.product-zoom-modal__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(10, 12, 20, 0.65);
}

.product-zoom-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(10, 12, 24, 0.82);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.product-zoom-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(10, 12, 24, 0.82);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.product-zoom-modal__nav.prev {
  left: 10px;
}

.product-zoom-modal__nav.next {
  right: 10px;
}

.product-zoom-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #eef2ff;
}

.cart {
  padding: 1rem 1.5rem 5rem;
}

.cart-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.cart-list {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  min-height: 220px;
  max-height: 520px;
  overflow: auto;
}

.cart-empty {
  color: var(--text-muted);
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cart-item h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.cart-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cart-item-variant {
  color: #c7d6ff !important;
  font-size: 0.82rem !important;
  margin-top: -0.2rem;
}

.cart-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.cart-actions .qty-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 700;
}

.cart-actions .remove-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.cart-summary {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  height: fit-content;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.summary-note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.checkout {
  max-width: var(--max-width);
  margin: 2rem auto 0;
}

.checkout-card {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 2rem;
}

.checkout-card h3 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
}

.checkout-address-form {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.checkout-address-form h4 {
  margin: 0;
  font-size: 1.02rem;
}

.checkout-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.checkout-address-grid label {
  display: grid;
  gap: 0.38rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.checkout-address-grid input {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.7rem 0.9rem;
  background: var(--card);
  color: var(--text);
}

.checkout-form {
  display: grid;
  gap: 1rem;
}

.checkout-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.checkout-form input {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.7rem 0.9rem;
  background: var(--card);
  color: var(--text);
}

.checkout-summary {
  background: rgba(255, 43, 209, 0.08);
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: pre-line;
}

.notice {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  display: grid;
  gap: 2rem;
}

.form-columns {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.form-card {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.8rem;
  display: grid;
  gap: 1rem;
}

.form-card.compact {
  padding: 1rem;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(255, 43, 209, 0.08), rgba(255, 119, 232, 0.05));
  min-height: auto;
  align-content: start;
}

.form-card.compact h2 {
  font-size: 1.15rem;
  margin: 0 0 0.3rem 0;
  color: #ffffff;
}

.form-card.compact .notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.3rem 0;
  line-height: 1.3;
}

.form-card.compact .form-grid {
  gap: 0.35rem;
  margin-bottom: 0;
}

.form-card.compact label {
  margin-bottom: 0;
}

.form-card.compact input {
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.88rem;
}

.form-card.compact .form-actions {
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.form-card.compact .btn.small {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.form-card h1,
.form-card h2 {
  font-family: var(--font-heading);
  margin-bottom: 0.2rem;
}

.form-grid {
  display: grid;
  gap: 0.6rem;
}

.form-grid label {
  display: grid;
  gap: 0.3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-grid input {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-panel {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.admin-list {
  display: grid;
  gap: 0.8rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.user-greeting {
  font-weight: 600;
  color: var(--text);
  margin-right: 0.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.user-greeting:empty {
  display: none;
}

.icon-btn.small {
  width: 32px;
  height: 32px;
  font-size: 1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 43, 209, 0.15), rgba(255, 119, 232, 0.15));
  border: 1.5px solid var(--border);
  transition: all 0.2s ease;
  transform: rotate(-90deg);
}

.icon-btn.small:hover {
  background: linear-gradient(135deg, rgba(255, 43, 209, 0.25), rgba(255, 119, 232, 0.25));
  box-shadow: 0 4px 12px rgba(255, 43, 209, 0.2);
}

.icon-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg);
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.cart-badge.is-empty {
  display: none;
}

.cart-toast {
  position: fixed;
  top: 90px;
  right: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 600;
  z-index: 20;
  transform: translateY(-10px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cart-float {
  position: fixed;
  top: 120px;
  right: 24px;
  width: min(340px, 90vw);
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 18;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  animation: floatIn 0.3s ease;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.is-admin .cart-float {
  display: none;
}

.cart-float.is-collapsed {
  transform: translateX(calc(100% + 16px));
  opacity: 0;
  pointer-events: none;
}

.cart-handle {
  position: fixed;
  top: 130px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(255, 43, 209, 0.3);
  z-index: 19;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
}

.cart-handle:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(255, 43, 209, 0.4);
}

.cart-handle .icon-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(-90deg);
  transition: transform 0.3s ease;
}

.cart-float.is-collapsed + .cart-handle {
  opacity: 1;
  pointer-events: auto;
}

.cart-float.is-collapsed + .cart-handle .icon-arrow {
  transform: rotate(45deg);
}

.is-admin .cart-handle {
  display: none;
}

.cart-float-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-float-header .icon-arrow {
  transform: rotate(-43deg);
}

.cart-float-list {
  display: grid;
  gap: 0.6rem;
  max-height: 260px;
  overflow: auto;
  padding-right: 0.3rem;
}

.cart-float-item {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  align-items: center;
}

.cart-float-item div {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cart-float-item .remove-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
}

.cart-float-footer {
  display: grid;
  gap: 0.6rem;
  font-weight: 600;
}

/* Chart tooltip */
.chart-tooltip {
  position: fixed;
  background: rgba(255,255,255,0.98);
  color: #111;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(10,10,20,0.35);
  z-index: var(--z-tooltip);
  max-width: 320px;
  overflow: auto;
  max-height: 60vh;
}

.chart-tooltip .orders-list div { padding: 8px 6px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.chart-tooltip .orders-list div:last-child { border-bottom: none; }
.chart-bar-caption strong { display:block; margin-top:6px; }
.chart-bars { gap:12px; padding:12px; }

.chart-bars { display:flex; align-items:flex-end; gap:0.6rem; height:220px; padding-bottom:8px; }
.chart-bar { width:48px; min-width:48px; background: transparent; border-radius:6px; display:flex; flex-direction:column; align-items:center; gap:6px; }
.chart-bar-inner { width:100%; background: linear-gradient(180deg, #ff77e8, #ff2bd1); border-radius:6px 6px 0 0; transition: transform 0.12s ease; }
.chart-bar-caption { font-size:0.75rem; text-align:center; color: rgba(255,255,255,0.9); }
.chart-bar:hover .chart-bar-inner { transform: translateY(-6px); }

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3.5rem 1.5rem 2rem;
  color: #f4f7fb;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}

.footer-column {
  display: grid;
  gap: 0.6rem;
}

.footer-column h3 {
  font-family: var(--font-heading);
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  color: #ffffff;
}

.footer-column a,
.footer-column p {
  color: rgba(255, 255, 255, 0.7);
  display: block;
}

.footer-socials {
  margin-top: 1.2rem;
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.95rem;
}

.footer-socials a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 43, 209, 0.3);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Admin panel styles */
.admin-body {
  max-width: var(--max-width);
  margin: 1.6rem auto 3rem;
  background: linear-gradient(180deg, rgba(20,22,28,0.75), rgba(29,31,37,0.85));
  border-radius: 14px;
  padding: 1rem;
  color: #fff;
  box-shadow: 0 10px 30px rgba(10,12,18,0.35);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  align-items: start;
}

.admin-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.6rem;
}

.admin-tab {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  padding: 0.9rem 0.8rem;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
}

.admin-tab.is-active {
  background: linear-gradient(135deg, rgba(255,43,209,0.14), rgba(255,119,232,0.08));
  border-color: rgba(255,43,209,0.25);
  box-shadow: 0 6px 18px rgba(33,10,48,0.25);
}

.admin-float-body {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 10px;
  padding: 1rem;
  min-height: 240px;
}

.admin-panel-section {
  display: none;
}

.admin-panel-section.is-active {
  display: block;
}

.admin-float-list .admin-user-row,
.admin-order-group,
.admin-order-row,
.admin-user-orders {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.admin-user-row strong { font-size: 0.95rem; }
.admin-user-row span { opacity: 0.8; font-size: 0.85rem; }
.admin-user-row .actions button { margin-left: 0.4rem; }
.admin-order-group {
  padding: 0;
  overflow: hidden;
  display: block;
}
.admin-order-group-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem;
}
.admin-order-group-summary::-webkit-details-marker {
  display: none;
}
.admin-order-group-main {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}
.admin-order-group-main strong {
  font-size: 0.98rem;
}
.admin-order-group-main .muted {
  font-size: 0.84rem;
}
.admin-order-group-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
}
.admin-order-group-caret {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid rgba(255,255,255,0.8);
  border-bottom: 2px solid rgba(255,255,255,0.8);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.admin-order-group[open] .admin-order-group-caret {
  transform: rotate(225deg);
}
.admin-order-group-content {
  padding: 0 0.8rem 0.8rem;
  display: grid;
  gap: 0.6rem;
}
.admin-order-row { align-items: flex-start; }
.admin-order-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}
.admin-order-main .order-body {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}
.order-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
}
.order-totals span {
  color: rgba(255, 255, 255, 0.78);
}
.order-totals strong {
  color: #fff;
  font-size: 0.92rem;
}
.order-items {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.24rem;
}
.order-items li {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.86rem;
}
.order-items.order-items-media {
  padding-left: 0;
  list-style: none;
  gap: 0.5rem;
}
.order-item-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 0.6rem;
}
.order-item-media {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(6, 8, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.order-item-media-fallback {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 1.1;
  padding: 0 0.25rem;
}
.order-item-content {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.35;
}
.order-status-line {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.18rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-created,
.payment-pending {
  border-color: rgba(253, 186, 116, 0.45);
  color: #fdba74;
}
.status-preparing {
  border-color: rgba(147, 197, 253, 0.45);
  color: #93c5fd;
}
.status-shipped {
  border-color: rgba(167, 139, 250, 0.45);
  color: #c4b5fd;
}
.status-completed,
.payment-paid {
  border-color: rgba(74, 222, 128, 0.45);
  color: #86efac;
}
.status-cancelled,
.payment-failed {
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}
.payment-refunded {
  border-color: rgba(196, 181, 253, 0.5);
  color: #ddd6fe;
}
.admin-order-row .actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 170px;
}
.admin-order-row .actions .btn {
  width: 100%;
}
.admin-order-row .actions .btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.sales-controls { display:flex; gap:0.6rem; flex-wrap:wrap; margin-bottom:1rem; }

.chart-block {
  width: 100%;
  background: rgba(14, 16, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  height: 220px;
  padding: 12px;
  width: 100%;
  overflow-x: auto; /* allow horizontal scroll when many buckets */
  -webkit-overflow-scrolling: touch;
}
.chart-bar {
  /* let bars size responsively across the full width of the panel */
  flex: 0 0 calc(100% / 7 - 0.8rem); /* default to 7 columns (daily view) */
  min-width: 48px;
  max-width: 84px;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: transparent;
  border-radius: 8px;
}
.chart-bar-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-radius: 8px 8px 0 0;
  transition: transform 0.12s ease;
  box-shadow: 0 6px 18px rgba(255, 43, 209, 0.12) inset;
}
.chart-bar-caption { font-size: 0.8rem; text-align: center; color: rgba(255,255,255,0.95); margin-top: 6px; }
.chart-bar:hover .chart-bar-inner { transform: translateY(-6px); }

/* Dark themed, compact tooltip matching admin panel */
.chart-tooltip {
  position: fixed;
  background: linear-gradient(180deg, rgba(18,20,24,0.98), rgba(28,30,36,0.98));
  color: #fff;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(3,6,10,0.55);
  z-index: var(--z-tooltip);
  max-width: 240px;
  width: min(240px, 92vw);
  overflow: hidden;
  max-height: 34vh;
  border: 1px solid rgba(255,255,255,0.06);
  pointer-events: auto;
}
.chart-tooltip .orders-list { max-height: 24vh; overflow: auto; padding: 4px; }
.chart-tooltip .orders-list div { padding: 9px 8px; border-bottom: 1px solid rgba(255,255,255,0.05); color: rgba(255,255,255,0.95); }
.chart-tooltip .orders-list div:last-child { border-bottom: none; }
.chart-tooltip .order-meta { opacity: 0.85; font-size: 0.9rem; margin-bottom: 6px; }
.chart-tooltip .order-line { display: flex; justify-content: space-between; gap: 0.6rem; }
.chart-tooltip .order-total { color: var(--accent); font-weight: 700; margin-top: 8px; }

/* Responsive layout */
@media (max-width: 1024px) {
  .header-inner { padding: 1rem 1.2rem; gap: 0.8rem; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-list { max-height: none; }
}

@media (max-width: 900px) {
  .menu-toggle { display: grid; }
  .header-inner { flex-wrap: wrap; }
  .logo { order: 1; }
  .header-actions { order: 2; margin-left: auto; gap: 0.6rem; }
  .nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.8rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-top: 0.6rem;
    overflow: visible;
    white-space: normal;
  }
  body.nav-open .nav { display: flex; }

  .hero { padding: 4rem 1.2rem 3rem; }
  .hero-inner { gap: 2rem; }
  .collection-card img { height: 240px; padding: 0.5rem; }
  .product-card img { height: 210px; padding: 0.5rem; }
  .category-hero-inner { flex-direction: column; align-items: flex-start; }
  .filters { grid-template-columns: 1fr; }

  .admin-body { grid-template-columns: 1fr; }
  .admin-tabs { flex-direction: row; overflow-x: auto; }
  .admin-tab { min-width: 160px; text-align: center; }
  .admin-order-group-summary { flex-direction: column; align-items: flex-start; }
  .admin-order-group-meta { width: 100%; justify-content: space-between; }
  .admin-order-row { flex-direction: column; }
  .admin-order-row .actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
  }
  .admin-order-row .actions .btn { width: auto; flex: 1 1 160px; }

  .product-modal { padding: 1.2rem; }
  .product-form-grid { grid-template-columns: 1fr; }
  .batch-row__body { grid-template-columns: 1fr; }
  .batch-row__preview-wrap { max-width: 220px; }
  .batch-row .row-grid { grid-template-columns: 1fr; }
  .product-batch-count { margin-left: 0; }

  .hero-slider { min-height: 220px; }
  .hero-slide-meta { padding: 1rem; }
  .is-admin .hero-slider { min-height: 220px; }
  body:not(.is-admin) .hero-slider { min-height: 360px; }
  .hero-stack { gap: 1rem; }

  .chart-bars { height: 180px; }
  .chart-bar { min-width: 44px; flex: 0 0 calc(100% / 5 - 0.6rem); height: 160px; }
  .chart-tooltip { max-width: 88vw; width: 88vw; border-radius: 10px; }

  .newsletter { grid-template-columns: 1fr; gap: 0.8rem; padding: 1.2rem; }
  .newsletter__form { justify-content: stretch; }
}

@media (max-width: 600px) {
  .topbar { font-size: 0.82rem; padding: 0.6rem 0.8rem; }
  .header-inner { padding: 0.9rem 1rem; }
  .user-greeting { display: none; }
  .hero { padding: 3.2rem 1rem 2.6rem; }
  .hero-text h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
  .hero-card img { height: 200px; }
  .collections,
  .products,
  .cart { padding: 1rem 1rem 4rem; }
  .collection-card img { height: 200px; padding: 0.45rem; }
  .collection-info { font-size: 1rem; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card img { height: 190px; padding: 0.45rem; }
  .product-variants { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 1fr; }

  .form-section { padding: 2rem 1rem 4rem; }
  .form-columns { grid-template-columns: 1fr; }
  .form-card { padding: 1.2rem; }

  .hero-slider { min-height: 200px; }
  .hero-nav { display: none; }
  .is-admin .hero-nav { display: grid; }
  .hero-stack { gap: 0.8rem; }

  .checkout { padding: 1rem; }
  .checkout-card { padding: 1rem; }
  .checkout-address-grid { grid-template-columns: 1fr; }

  .cart-toast { right: 12px; top: 84px; }
  .cart-float { right: 12px; top: 96px; width: min(340px, 94vw); }
  .cart-handle { right: 12px; top: 102px; }

  .admin-body { margin: 1rem 0.8rem 2rem; padding: 0.8rem; }
  .admin-float-body { padding: 0.8rem; }
  .admin-order-row .actions .btn { flex: 1 1 100%; }

  .modal-overlay { padding: 0.8rem; }
  .product-modal { border-radius: 16px; }
  .product-batch-toolbar { align-items: stretch; }
  .product-batch-toolbar .btn { width: 100%; }
  .batch-row .row-actions { flex-direction: column; align-items: stretch; }
  .batch-row .row-actions .product-toggle { justify-content: center; }

  .chart-bars { height: 140px; }
  .chart-bar { min-width: 40px; flex: 0 0 calc(100% / 4 - 0.6rem); height: 130px; }
  .chart-tooltip { max-height: 46vh; }

  .newsletter { padding: 1rem; }
  .newsletter__form { gap: 0.6rem; }
  .newsletter__form input { flex: 1 1 100%; }

  .hero-uploader { padding: 0 1rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2e2f38;
    --bg-soft: #3a3b46;
    --card: #343642;
    --text: #f7f8ff;
    --text-muted: #d0d2e4;
    --border: rgba(255, 255, 255, 0.14);
    --shadow: 0 20px 60px rgba(10, 10, 18, 0.45);
    --footer-bg: #242632;
  }

  body {
    background: radial-gradient(circle at top, #3b3d49 0%, #2b2d38 45%, #22232c 100%);
  }

  .site-header {
    background: rgba(15, 11, 18, 0.9);
  }

  .icon-btn {
    background: var(--card);
  }

  .collection-card:hover,
  .collection-card:focus-visible {
    border-color: rgba(255, 255, 255, 0.3);
  }

  .cart-actions .remove-btn {
    color: var(--text-muted);
  }
}
