
/* =====================================================
   STORECRAFT — COMPLETE RESPONSIVE STYLESHEET
   Compatible with index.html and StoreCraft script.js
===================================================== */

/* ================= RESET ================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #7255e8;
  --accent-dark: #6042d5;
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface-soft: #f5f3fa;
  --text: #252236;
  --muted: #858397;
  --border: #eae9f0;
  --success: #168c73;
  --danger: #e05252;
  --warning: #d99a32;
  --sidebar-width: 250px;
  --radius: 14px;
  --shadow: 0 5px 25px rgba(31, 25, 65, 0.05);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input,
textarea,
select {
  width: 100%;
  outline: none;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

::selection {
  background: #7255e8;
  color: #ffffff;
}


/* ================= BUTTONS ================= */

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.primary-btn {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.primary-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

.secondary-btn {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
}

.secondary-btn:hover {
  background: #f6f5fa;
  border-color: #d8d5e5;
}

.full-btn {
  width: 100%;
}

.text-button {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.text-button:hover {
  text-decoration: underline;
}


/* ================= BRAND ================= */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.7px;
  color: var(--text);
}

.brand-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #ffffff;
  border-radius: 11px;
  font-size: 19px;
  font-weight: 800;
}


/* ================= AUTH SCREEN ================= */

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px 18px;
  background:
    radial-gradient(circle at 15% 15%, #e9e3ff 0, transparent 35%),
    radial-gradient(circle at 90% 85%, #eee9ff 0, transparent 32%),
    #f8f7fc;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 38px;
  background: #ffffff;
  border: 1px solid #eeedf3;
  border-radius: 20px;
  box-shadow: 0 15px 55px rgba(46, 36, 94, 0.09);
}

.auth-brand {
  margin-bottom: 35px;
}

.auth-heading {
  margin-bottom: 25px;
}

.auth-heading h1 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
}

.auth-heading p {
  color: var(--muted);
  font-size: 13px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 17px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: #464357;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  min-height: 43px;
  padding: 11px 13px;
  border: 1px solid #e5e3ec;
  border-radius: 9px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  transition: 0.2s ease;
}

.form-group textarea {
  resize: vertical;
  min-height: 90px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(114, 85, 232, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #aaa8b6;
}

.form-group small {
  color: var(--muted);
  font-size: 11px;
}

.auth-forgot {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 18px;
}

.auth-switch {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.auth-switch button {
  margin-left: 4px;
  background: none;
  border: 0;
  color: var(--accent);
  font-weight: 700;
}

.auth-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: #aaa8b6;
  font-size: 11px;
}

.form-message {
  margin-top: 12px;
  color: var(--danger);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.back-button {
  margin-top: 20px;
}


/* ================= MAIN LAYOUT ================= */

.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

#builder:not([hidden]) {
  display: flex;
}


/* ================= SIDEBAR ================= */

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px 16px 17px;
  background: #ffffff;
  border-right: 1px solid var(--border);
  z-index: 20;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
}

.sidebar .brand {
  padding: 0 10px;
  margin-bottom: 38px;
}

.sidebar-label {
  padding: 0 11px;
  margin-bottom: 11px;
  color: #aaa8b6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #777487;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  transition: 0.2s ease;
}

.nav:hover {
  background: #f7f5fc;
  color: var(--accent);
}

.nav.active {
  background: #f0edff;
  color: var(--accent);
  font-weight: 700;
}

.nav-icon {
  width: 19px;
  text-align: center;
  font-size: 17px;
}

.premium-label {
  margin-top: 32px;
}

.premium-nav {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #f4dfae;
  border-radius: 9px;
  background: #fffbeb;
  color: #bd811d;
  font-size: 12px;
  font-weight: 700;
  transition: 0.2s;
}

.premium-nav:hover {
  background: #fff4d5;
}

.sidebar-bottom {
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 5px 13px;
  min-width: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eeeaff;
  color: var(--accent);
  font-weight: 800;
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-info strong {
  font-size: 12px;
}

.user-info span {
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #858397;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.logout-btn:hover {
  background: #fff0f0;
  color: var(--danger);
}


/* ================= MAIN CONTENT ================= */

.main-content {
  flex: 1;
  min-width: 0;
  padding: 0 34px 45px;
}

.topbar {
  min-height: 91px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.topbar-left h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.topbar-left p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.publish-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.publish-btn {
  min-width: 125px;
}


/* ================= PAGE NAVIGATION ================= */

.page {
  display: none;
  animation: pageIn 0.2s ease;
}

.page.active {
  display: block;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-section {
  margin-bottom: 25px;
}

.welcome-section h2,
.page-intro h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.welcome-section p,
.page-intro p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 30px 0 16px;
}

.section-heading h2 {
  font-size: 16px;
  font-weight: 800;
}

.section-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}


/* ================= STAT CARDS ================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  min-height: 108px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 19px;
  font-weight: 800;
}

.stat-icon.purple {
  background: #f0edff;
  color: var(--accent);
}

.stat-icon.green {
  background: #e7f7f1;
  color: var(--success);
}

.stat-icon.orange {
  background: #fff5e6;
  color: #d99a32;
}

.stat-card div:last-child {
  display: flex;
  flex-direction: column;
}

.stat-card span {
  color: var(--muted);
  font-size: 11px;
}

.stat-card strong {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 800;
}

.stat-card small {
  color: var(--muted);
  font-size: 10px;
}


/* ================= QUICK ACTIONS ================= */

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quick-action-card {
  min-height: 130px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  transition: 0.2s;
}

.quick-action-card:hover {
  border-color: #c9bfff;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.quick-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f0edff;
  color: var(--accent);
  font-size: 17px;
}

.quick-action-card strong {
  font-size: 12px;
}

.quick-action-card small {
  color: var(--muted);
  font-size: 11px;
}


/* ================= PRODUCTS ================= */

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-item {
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 13px;
  transition: 0.2s;
}

.product-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.product-image {
  width: 100%;
  height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f4f2f8;
  color: #c5c1d1;
  font-size: 35px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 14px;
}

.product-info h3 {
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.product-info p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  min-height: 17px;
  overflow-wrap: anywhere;
}

.product-price {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}

.product-actions {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

.product-actions button {
  flex: 1;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.product-actions button:hover {
  background: #f5f3fa;
}

.product-actions button.delete {
  color: var(--danger);
  border-color: #f2dcdc;
}

.product-actions button.delete:hover {
  background: #fff1f1;
}

.products-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.search-box {
  width: min(100%, 340px);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
  color: var(--muted);
}

.search-box span {
  font-size: 20px;
}

.search-box input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 12px;
  color: var(--text);
}

.filter-control {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
}

.filter-control select {
  max-width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.product-result-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.products-toolbar > .secondary-btn {
  min-height: 42px;
  padding: 8px 13px;
  font-size: 11px;
}

.empty-state {
  padding: 45px 20px;
  text-align: center;
  border: 1px dashed #dcd9e7;
  border-radius: 13px;
  background: #ffffff;
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f0edff;
  color: var(--accent);
  font-size: 23px;
}

.empty-state h3 {
  font-size: 15px;
}

.empty-state p {
  margin: 6px 0 17px;
  color: var(--muted);
  font-size: 12px;
}


/* ================= PUBLISH CARD ================= */

.publish-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding: 21px;
  border: 1px solid #e5e0fa;
  border-radius: 13px;
  background: linear-gradient(110deg, #f4f0ff, #ffffff);
}

.publish-card-content {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.publish-card-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e9e3ff;
  color: var(--accent);
  font-size: 21px;
}

.publish-card h2 {
  font-size: 14px;
}

.publish-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.publish-card-actions {
  display: flex;
  gap: 8px;
}


/* ================= DESIGN STUDIO ================= */

.design-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
  align-items: start;
}

.design-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.design-section {
  padding: 19px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.design-section-heading {
  margin-bottom: 16px;
}

.design-section-heading h3 {
  font-size: 14px;
  font-weight: 800;
}

.design-section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.premium-note {
  display: inline-block;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #fff5df;
  color: #b77b1a;
  font-size: 9px;
  font-weight: 800;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.theme-option {
  position: relative;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
  transition: 0.2s;
}

.theme-option:hover {
  border-color: #c9bfff;
}

.theme-option.selected {
  border: 2px solid var(--accent);
  padding: 9px;
  background: #fbfaff;
}

.theme-swatch {
  width: 100%;
  height: 40px;
  display: block;
  margin-bottom: 8px;
  border-radius: 6px;
}

.light-swatch {
  background: linear-gradient(90deg, #ffffff 60%, #eeeaf8 60%);
  border: 1px solid #e9e7ef;
}

.dark-swatch {
  background: linear-gradient(90deg, #211f2b 60%, #393545 60%);
}

.luxury-swatch {
  background: linear-gradient(90deg, #f6eddf 60%, #c7a87a 60%);
}

.colorful-swatch {
  background: linear-gradient(90deg, #fff2f6 60%, #ffb8d0 60%);
}

.theme-option strong {
  font-size: 11px;
}

.theme-option small {
  color: var(--muted);
  font-size: 9px;
}

.premium-lock {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 5px;
  background: #fff1d6;
  color: #b77b1a;
  font-size: 9px;
  font-weight: 800;
}

.theme-option .premium-lock {
  position: absolute;
  top: 8px;
  right: 8px;
}

.color-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-bottom: 17px;
}

.color-dot {
  width: 28px;
  height: 28px;
  border: 3px solid #ffffff;
  outline: 1px solid transparent;
  border-radius: 50%;
  background: var(--dot);
  transition: 0.2s;
}

.color-dot.selected {
  outline: 2px solid var(--dot);
}

.color-options input[type="color"] {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.color-picker-grid input[type="color"],
.compact-group input[type="color"] {
  width: 100%;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.compact-group {
  max-width: 180px;
  margin-bottom: 0;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  position: relative;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: #696779;
  font-size: 11px;
  font-weight: 600;
}

.choice:hover {
  border-color: #c9bfff;
}

.choice.selected {
  border-color: var(--accent);
  background: #f2efff;
  color: var(--accent);
}

.choice .premium-lock {
  margin-left: 5px;
  font-size: 8px;
}

.upload-area {
  min-height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px dashed #d5d0e4;
  border-radius: 10px;
  background: #faf9fd;
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}

.upload-area:hover {
  border-color: var(--accent);
  background: #f8f6ff;
}

.upload-area img {
  display: block;
  max-width: 100%;
  max-height: 100px;
  margin: auto;
  object-fit: contain;
}

.upload-area span {
  font-size: 11px;
}

.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 37px;
  margin-bottom: 15px;
  color: #555365;
  font-size: 12px;
  font-weight: 600;
}

.switch-row input {
  position: absolute;
  right: 0;
  width: 39px;
  height: 22px;
  opacity: 0;
  cursor: pointer;
}

.switch {
  width: 39px;
  height: 22px;
  position: relative;
  border-radius: 20px;
  background: #d9d7e1;
  transition: 0.2s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transition: 0.2s;
}

.switch-row input:checked + .switch {
  background: var(--accent);
}

.switch-row input:checked + .switch::after {
  left: 20px;
}

.section-order-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.section-order-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: grab;
}

.section-order-list li:active {
  cursor: grabbing;
}

.drag-handle {
  color: #aaa7b7;
  font-size: 18px;
}


/* ================= DESIGN PREVIEW ================= */

.design-preview-column {
  position: sticky;
  top: 20px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.preview-heading h3 {
  font-size: 14px;
}

.preview-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.preview-indicator {
  padding: 4px 7px;
  border-radius: 5px;
  background: #e7f7f1;
  color: var(--success);
  font-size: 9px;
  font-weight: 800;
}

.design-preview-container {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 13px;
}

.design-preview {
  min-height: 320px;
  padding: 12px;
  overflow: hidden;
  background: var(--preview-bg, #ffffff);
  color: var(--preview-text, #252236);
}

.preview-hero {
  position: relative;
  padding: 48px 12px 35px;
  text-align: center;
  overflow: hidden;
}

.preview-hero h3 {
  position: relative;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.preview-hero p {
  position: relative;
  margin: 9px 0 17px;
  font-size: 11px;
  opacity: 0.7;
}

.preview-button {
  position: relative;
  min-height: 34px;
  padding: 8px 15px;
  font-size: 10px;
  font-weight: 700;
  cursor: default;
}

.preview-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-radius: var(--card-radius, 18px);
  background: var(--preview-card, #f5f3fa);
  font-size: 11px;
}

.preview-product b {
  color: var(--accent);
}

.preview-banner {
  padding: 9px 12px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.decoration {
  position: absolute;
  pointer-events: none;
}

.decoration.circle {
  width: 70px;
  height: 70px;
  top: 10px;
  right: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.08;
}

.decoration.sparkle {
  top: 8px;
  right: 20px;
  color: var(--accent);
  font-size: 35px;
}


/* ================= SETTINGS ================= */

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.settings-card {
  padding: 23px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.settings-card-heading {
  margin-bottom: 22px;
}

.settings-card-heading h3 {
  font-size: 15px;
}

.settings-card-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.slug-input {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #e5e3ec;
  border-radius: 9px;
  background: #ffffff;
}

.slug-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(114, 85, 232, 0.1);
}

.slug-input span {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.slug-input input {
  min-height: 42px;
  border: 0;
  outline: none;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.info-row span {
  color: var(--muted);
}

.info-row strong {
  text-align: right;
  font-size: 11px;
}

.settings-help {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 13px;
  border-radius: 9px;
  background: #f3f0ff;
  color: #6250a5;
}

.settings-help p {
  font-size: 11px;
}

.help-icon {
  font-size: 17px;
}


/* ================= OWNER PANEL ================= */

.owner-badge {
  padding: 6px 10px;
  border-radius: 6px;
  background: #f0edff;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.owner-card {
  max-width: 650px;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.owner-card-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}

.owner-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f0edff;
  color: var(--accent);
  font-size: 22px;
}

.owner-card-heading h3 {
  font-size: 15px;
}

.owner-card-heading p {
  color: var(--muted);
  font-size: 11px;
}

.owner-warning {
  margin-bottom: 17px;
  padding: 12px;
  border-radius: 8px;
  background: #fff7e9;
  color: #956b20;
  font-size: 11px;
}

.generated-code-area {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #faf9fd;
}

.generated-code-area label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.generated-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.generated-code-row strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  letter-spacing: 1px;
}


/* ================= MODALS ================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(24, 20, 43, 0.55);
  backdrop-filter: blur(4px);
}

.modal-backdrop.open {
  display: flex !important;
}

.modal {
  width: 100%;
  max-width: 470px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}

.modal-header h2 {
  font-size: 19px;
  font-weight: 800;
}

.modal-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f4f3f7;
  color: #777487;
  font-size: 22px;
  line-height: 1;
}

.modal-close:hover {
  background: #eeeaf8;
  color: var(--text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.product-upload-area {
  min-height: 115px;
}

.premium-star {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 24px;
}

.premium-feature-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 16px;
  border-radius: 10px;
  background: #faf9fd;
  color: #514e61;
  font-size: 12px;
}

.premium-activation {
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.premium-activation h3 {
  margin-bottom: 14px;
  font-size: 13px;
}

.premium-contact {
  margin-top: 18px;
}

.premium-contact p {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
}


/* ================= PUBLIC STORE ================= */

.public-screen {
  --store-bg: #ffffff;
  --store-text: #252236;
  --store-card: #f5f3fa;
  --card-radius: 18px;
  --accent: #7255e8;

  min-height: 100vh;
  background: var(--store-bg);
  color: var(--store-text);
}

.public-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 5%;
  border-bottom: 1px solid rgba(120, 115, 140, 0.15);
  background: var(--store-bg);
}

.public-brand {
  font-size: 16px;
}

.public-brand .brand-icon {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.public-mode-label {
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--store-card);
  color: var(--store-text);
  font-size: 10px;
  font-weight: 700;
}

.public-store {
  width: 100%;
  min-height: calc(100vh - 68px);
  background: var(--store-bg);
  color: var(--store-text);
}

.store-banner {
  width: 100%;
  padding: 11px 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.store-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 65px 20px;
  text-align: center;
  overflow: hidden;
}

.store-hero h1 {
  max-width: 800px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -1.4px;
  overflow-wrap: anywhere;
}

.store-hero p {
  max-width: 650px;
  margin-top: 15px;
  color: inherit;
  opacity: 0.72;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.store-hero .primary-btn {
  margin-top: 23px;
}

.store-products {
  padding: 35px 5% 65px;
}

.store-products h2 {
  margin-bottom: 22px;
  font-size: 23px;
  letter-spacing: -0.5px;
}

.store-product-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: -5px 0 20px;
}

.store-product-search,
.store-category-filter {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid currentColor;
  border-radius: 10px;
  color: inherit;
  opacity: .82;
}

.store-product-search {
  width: min(100%, 330px);
}

.store-product-search span {
  font-size: 20px;
}

.store-product-search input,
.store-category-filter select {
  width: 100%;
  min-width: 130px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
}

.store-product-search input::placeholder {
  color: currentColor;
  opacity: .65;
}

.store-product-count {
  margin-left: auto;
  font-size: 11px;
  opacity: .68;
  white-space: nowrap;
}

.store-no-results {
  margin: 10px 0 0;
  padding: 22px;
  border: 1px dashed currentColor;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  opacity: .75;
}

.store-product[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.store-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.store-product {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--store-card);
  color: var(--store-text);
}

.store-product > img,
.store-product .no-image {
  width: 100%;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  background: rgba(120, 115, 140, 0.08);
}

.store-product .no-image {
  color: inherit;
  opacity: 0.5;
  font-size: 12px;
}

.store-product-content {
  padding: 15px;
}

.store-product-content h3 {
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.store-product-content p {
  min-height: 20px;
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.5;
  opacity: 0.65;
  overflow-wrap: anywhere;
}

.store-product-content strong {
  display: block;
  margin-top: 13px;
  font-size: 17px;
}

.store-product-content a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 14px;
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
}

.store-footer {
  padding: 25px 15px;
  border-top: 1px solid rgba(120, 115, 140, 0.15);
  text-align: center;
  font-size: 12px;
  opacity: 0.75;
}

.store-footer span {
  display: inline-block;
  margin-top: 7px;
  font-size: 10px;
}

.public-store .empty {
  max-width: 500px;
  margin: 80px auto;
  padding: 30px;
  text-align: center;
}

.public-store .empty h2 {
  margin-bottom: 10px;
}

.public-store .empty p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
}

.public-store .empty a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border-radius: 9px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}


/* ================= TOAST ================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  z-index: 2000;
  max-width: calc(100% - 30px);
  padding: 12px 19px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #292638;
  color: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: 0.25s ease;
  overflow-wrap: anywhere;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}


/* ================= TABLET ================= */

@media (max-width: 1100px) {

  :root {
    --sidebar-width: 220px;
  }

  .main-content {
    padding-left: 23px;
    padding-right: 23px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .design-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 15px;
  }

  .store-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}


/* ================= SMALL TABLET ================= */

@media (max-width: 800px) {

  .sidebar {
    width: 190px;
    min-width: 190px;
    padding-left: 11px;
    padding-right: 11px;
  }

  .sidebar .brand {
    font-size: 16px;
  }

  .main-content {
    padding-left: 17px;
    padding-right: 17px;
  }

  .design-layout {
    grid-template-columns: 1fr;
  }

  .design-preview-column {
    position: static;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 13px;
    gap: 9px;
  }

  .quick-actions-grid {
    gap: 9px;
  }

  .store-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}


/* ================= MOBILE ================= */

@media (max-width: 600px) {

  body {
    font-size: 13px;
  }

  .auth-screen {
    padding: 18px 12px;
  }

  .auth-card {
    padding: 25px 20px;
    border-radius: 16px;
  }

  .auth-heading h1 {
    font-size: 23px;
  }

  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
  }

  .sidebar-top {
    width: 100%;
  }

  .sidebar .brand {
    margin: 0 0 10px;
    padding: 0 3px;
    font-size: 16px;
  }

  .sidebar .brand-icon {
    width: 29px;
    height: 29px;
    font-size: 16px;
  }

  .sidebar-label,
  .sidebar-bottom,
  .premium-label {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: row;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav {
    width: auto;
    min-width: max-content;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    font-size: 10px;
  }

  .nav-icon {
    font-size: 14px;
  }

  .premium-nav {
    display: none !important;
  }

  .main-content {
    width: 100%;
    padding: 0 14px 30px;
  }

  .topbar {
    min-height: 76px;
    margin-bottom: 20px;
    gap: 8px;
  }

  .topbar-left h1 {
    font-size: 17px;
  }

  .topbar-left p {
    font-size: 10px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .publish-state {
    font-size: 9px;
    max-width: 80px;
  }

  .publish-btn {
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 10px;
  }

  .welcome-section h2,
  .page-intro h2 {
    font-size: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .stat-card {
    min-height: 78px;
    padding: 13px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 16px;
  }

  .stat-card strong {
    font-size: 17px;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .quick-action-card {
    min-height: 90px;
    display: grid;
    grid-template-columns: 35px 1fr;
    align-items: center;
    column-gap: 10px;
  }

  .quick-action-card .quick-icon {
    grid-row: span 2;
  }

  .quick-action-card strong {
    align-self: end;
  }

  .quick-action-card small {
    align-self: start;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: 14px;
  }

  .section-heading .primary-btn {
    padding: 8px 10px;
    font-size: 10px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-image {
    height: 125px;
  }

  .product-info {
    padding: 10px;
  }

  .product-info h3 {
    font-size: 12px;
  }

  .product-info p {
    font-size: 10px;
  }

  .product-price {
    font-size: 14px;
  }

  .product-actions {
    flex-direction: column;
    gap: 5px;
  }

  .product-actions button {
    min-height: 31px;
  }

  .publish-card {
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
  }

  .publish-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .publish-card-actions button {
    padding: 8px;
    font-size: 10px;
  }

  .page-intro {
    align-items: flex-start;
  }

  .page-intro .primary-btn {
    min-height: 37px;
    padding: 8px 10px;
    font-size: 10px;
  }

  .design-section {
    padding: 14px;
  }

  .color-picker-grid {
    grid-template-columns: 1fr;
  }

  .color-picker-grid .form-group {
    margin-bottom: 5px;
  }

  .settings-card {
    padding: 17px;
  }

  .owner-card {
    padding: 17px;
  }

  .generated-code-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    padding: 19px;
    max-height: calc(100vh - 20px);
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions button {
    width: 100%;
  }

  .store-hero {
    min-height: 250px;
    padding: 45px 17px;
  }

  .store-hero h1 {
    font-size: 30px;
  }

  .store-hero p {
    font-size: 12px;
  }

  .store-products {
    padding: 25px 14px 40px;
  }

  .store-products h2 {
    font-size: 19px;
  }

  .store-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .store-product > img,
  .store-product .no-image {
    height: 140px;
  }

  .store-product-content {
    padding: 10px;
  }

  .store-product-content h3 {
    font-size: 12px;
  }

  .store-product-content p {
    font-size: 10px;
  }

  .store-product-content strong {
    font-size: 14px;
  }

  .store-product-content a {
    min-height: 34px;
    font-size: 10px;
  }

}


/* ================= VERY SMALL MOBILE ================= */

@media (max-width: 370px) {

  .main-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav {
    padding: 8px;
    font-size: 9px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-image {
    height: 180px;
  }

  .store-product-grid {
    grid-template-columns: 1fr;
  }

  .topbar-left p {
    display: none;
  }

  .publish-state {
    display: none;
  }

}
