/* GLOBAL */
:root {
  --bg-page: #eef3f7;
  --bg-surface: #ffffff;
  --bg-soft: #f6f9fb;
  --text-main: #122033;
  --text-muted: #5c6c80;
  --line-soft: #d6dee8;
  --line-strong: #bcc8d6;
  --brand-dark: #10233f;
  --brand-accent: #1b9d62;
  --brand-accent-strong: #0f7a4a;
  --cart-drawer-width: min(380px, 92vw);
  --cart-drawer-top-offset: 78px;
  --cart-drawer-bottom-gap: 12px;
  --warning-bg: #fff8e6;
  --warning-text: #8b5b00;
  --error-bg: #ffeef0;
  --error-text: #ae2134;
  --success-bg: #eaf9ef;
  --success-text: #16653f;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 16px 34px rgba(11, 36, 66, 0.08);
  --shadow-strong: 0 30px 70px rgba(7, 20, 37, 0.2);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text-main);
  background: linear-gradient(180deg, #f3f7fb 0%, #eaf0f6 100%);
  line-height: 1.42;
  overflow-x: hidden;
}

body.drawer-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(27, 157, 98, 0.35);
  outline-offset: 2px;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(188, 200, 214, 0.8);
  box-shadow: 0 10px 24px rgba(11, 36, 66, 0.08);
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5de5d, #f0b937);
  color: #2a2207;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(240, 185, 55, 0.45);
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.top-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.top-nav a:hover {
  background: #edf2f7;
  color: var(--text-main);
  transform: translateY(-1px);
}

.top-nav a.nav-current {
  background: var(--brand-dark);
  color: #ffffff;
  font-weight: 600;
}

.top-nav .nav-admin-link {
  min-width: 64px;
  text-align: center;
}

.top-nav .nav-item-hidden {
  visibility: hidden;
  pointer-events: none;
}

.cart-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-icon:hover {
  background: #f2f7fb;
}

.cart-icon-glyph {
  font-size: 17px;
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #71839a;
  transition: background-color 0.15s ease;
}

.cart-badge.has-items {
  background: var(--brand-accent);
}

.profile-pill {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-main);
  padding: 8px 14px;
  font-size: 13px;
}

.profile-pill:hover {
  background: #f4f7fb;
}

.customer-greeting {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary,
.btn-outline {
  border-radius: 999px;
  border: none;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.12s ease, filter 0.12s ease, background-color 0.12s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-strong));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 122, 74, 0.32);
}

.btn-primary:hover {
  filter: brightness(1.04);
}

.btn-primary:disabled,
.btn-outline:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-outline {
  border: 1px solid var(--line-soft);
  background: #ffffff;
  color: var(--text-main);
}

.btn-outline:hover {
  background: #f3f7fb;
}

.btn-outline.btn-small {
  padding: 6px 11px;
  font-size: 12px;
}

.btn-outline.danger {
  border-color: #efc3c8;
  color: #9d2232;
}

.btn-outline.danger:hover {
  background: #fff1f3;
}

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 12px 20px;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.success {
  color: var(--success-text);
}

.warning {
  color: var(--warning-text);
}

.error {
  color: var(--error-text);
}

/* SHOP PAGE */
body.page-shop .page-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 16px 44px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  transition: margin-right 0.24s ease;
}

body.page-shop {
  background:
    radial-gradient(1200px 500px at 110% -10%, rgba(26, 124, 200, 0.09), transparent 58%),
    radial-gradient(900px 440px at -20% 12%, rgba(34, 161, 105, 0.1), transparent 56%),
    linear-gradient(180deg, #f3f7fb 0%, #eaf0f6 100%);
}

body.page-shop .sidebar-left {
  position: sticky;
  top: 84px;
}

body.page-shop .sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

body.page-shop .sidebar-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.page-shop .sidebar-section {
  border-top: 1px solid #e9eff5;
  padding-top: 10px;
  margin-top: 10px;
}

body.page-shop .sidebar-section:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

body.page-shop .sidebar-section-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #728299;
}

body.page-shop .category-link,
body.page-shop .chip {
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #4c5d73;
  font-size: 13px;
  text-align: left;
  padding: 7px 12px;
}

body.page-shop .category-link {
  width: 100%;
  display: block;
  margin-bottom: 6px;
}

body.page-shop .category-link:hover,
body.page-shop .chip:hover {
  background: #edf3f8;
}

body.page-shop .category-link.active,
body.page-shop .chip.active {
  background: #e5f6ed;
  border-color: #b8e4ca;
  color: var(--success-text);
  font-weight: 600;
}

body.page-shop .main-column {
  min-width: 0;
}

body.page-shop .section-heading h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.15;
}

body.page-shop .section-subtitle {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

body.page-shop .search-row {
  margin-top: 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.page-shop .search-box {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
  border-radius: 999px;
  padding: 8px 12px;
}

body.page-shop .search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--text-main);
}

body.page-shop .search-box input:focus {
  outline: none;
}

body.page-shop .filter-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

body.page-shop .chip {
  border-color: var(--line-soft);
  background: #ffffff;
}

body.page-shop .product-feedback {
  min-height: 22px;
  margin: 0 0 12px;
  font-size: 13px;
}

body.page-shop .product-feedback.warning {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
}

body.page-shop .product-feedback.error {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--error-bg);
}

body.page-shop .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 16px;
}

body.page-shop .product-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line-soft);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 13px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  animation: card-rise 0.35s ease both;
}

body.page-shop .product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(11, 36, 66, 0.14);
  border-color: #9dc6b0;
}

body.page-shop .product-card:nth-child(2n) {
  animation-delay: 0.03s;
}

body.page-shop .product-card:nth-child(3n) {
  animation-delay: 0.06s;
}

body.page-shop .product-image {
  width: 100%;
  height: 185px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #edf2f8;
  background: #eef3f8;
}

body.page-shop .product-card h3 {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 1.3;
}

body.page-shop .product-meta {
  margin: 0;
  font-size: 12px;
  color: #73849c;
}

body.page-shop .product-stock {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

body.page-shop .product-stock-in-stock {
  color: #1d7c4e;
}

body.page-shop .product-stock-low {
  color: #996b13;
}

body.page-shop .product-stock-sold-out {
  color: #a62839;
}

body.page-shop .product-description {
  margin: 0;
  font-size: 13px;
  color: #586981;
  line-height: 1.4;
}

body.page-shop .product-card-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.page-shop .product-price {
  font-weight: 700;
  font-size: 15px;
}

body.page-shop .add-to-cart-button {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--brand-accent);
  color: #ffffff;
  box-shadow: 0 8px 14px rgba(16, 122, 74, 0.25);
}

body.page-shop .add-to-cart-button:hover {
  background: var(--brand-accent-strong);
}

body.page-shop .add-to-cart-button:disabled {
  background: #9aa9ba;
  box-shadow: none;
  cursor: not-allowed;
}

body.page-shop .product-card-skeleton {
  pointer-events: none;
}

body.page-shop .skeleton-block {
  border-radius: 10px;
  background: linear-gradient(90deg, #edf2f7 20%, #f8fbfd 50%, #edf2f7 80%);
  background-size: 220% 100%;
  animation: pulse-loading 1.2s linear infinite;
}

body.page-shop .skeleton-image {
  height: 185px;
}

body.page-shop .skeleton-line {
  height: 12px;
}

body.page-shop .skeleton-line.short {
  width: 65%;
}

body.page-shop .skeleton-button {
  height: 30px;
  width: 45%;
  margin-left: auto;
}

@keyframes pulse-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -20% 0;
  }
}

body.page-shop .product-empty-state {
  grid-column: 1 / -1;
  background: #f9fbfd;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 32px 18px;
  text-align: center;
}

body.page-shop .product-empty-state h3 {
  margin: 0 0 8px;
}

body.page-shop .product-empty-state p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

body.page-shop .product-empty-state .empty-cta {
  margin-top: 10px;
}

body.page-shop .cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

body.page-shop .cart-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 30, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

body.page-shop .cart-drawer.open .cart-drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.page-shop .cart-drawer-panel {
  position: absolute;
  top: var(--cart-drawer-top-offset);
  bottom: var(--cart-drawer-bottom-gap);
  right: 0;
  width: var(--cart-drawer-width);
  height: auto;
  transform: translate3d(calc(100% + 10px), 0, 0);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
  padding: 8px 10px;
}

body.page-shop .cart-drawer.open .cart-drawer-panel {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: auto;
}

body.page-shop .cart-card {
  height: 100%;
  background: var(--bg-surface);
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-strong);
  padding: 15px;
  display: flex;
  flex-direction: column;
}

body.page-shop .cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body.page-shop .cart-title {
  margin: 0;
  font-size: 18px;
}

body.page-shop .cart-summary {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

body.page-shop .drawer-close {
  border: none;
  background: transparent;
  color: #68809e;
  font-size: 20px;
  line-height: 1;
  padding: 3px 6px;
}

body.page-shop .drawer-close:hover {
  color: var(--brand-dark);
}

body.page-shop .cart-items {
  flex: 1;
  margin-top: 12px;
  margin-bottom: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

body.page-shop .cart-empty {
  color: var(--text-muted);
  font-size: 13px;
}

body.page-shop .cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #edf2f8;
  padding: 8px 0;
}

body.page-shop .cart-item-main {
  min-width: 0;
}

body.page-shop .cart-item-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

body.page-shop .cart-item-meta {
  margin: 2px 0 0;
  font-size: 11px;
  color: #73849c;
}

body.page-shop .cart-item-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.page-shop .cart-qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: #f7fafc;
  color: #27435f;
  padding: 0;
}

body.page-shop .cart-qty-btn:hover {
  background: #ecf3f9;
}

body.page-shop .cart-qty {
  min-width: 18px;
  text-align: center;
  font-size: 12px;
}

body.page-shop .cart-line {
  min-width: 76px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
}

body.page-shop .cart-remove-btn {
  border: none;
  background: transparent;
  color: #8b5f6a;
  font-size: 16px;
  line-height: 1;
  padding: 0 3px;
}

body.page-shop .cart-remove-btn:hover {
  color: #b62033;
}

body.page-shop .payment-options {
  background: var(--bg-soft);
  border: 1px solid #e5edf5;
  border-radius: 12px;
  padding: 10px;
}

body.page-shop .payment-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

body.page-shop .payment-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
}

body.page-shop .payment-option:last-child {
  margin-bottom: 0;
}

body.page-shop .cart-divider {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 12px 0;
}

body.page-shop .cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.page-shop .modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 15, 26, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1200;
}

body.page-shop .modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

body.page-shop .modal-backdrop.open .modal-card {
  animation: modal-pop 0.2s ease both;
}

body.page-shop .modal-card {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-strong);
}

body.page-shop .product-modal {
  width: min(920px, 100%);
  padding: 20px;
  position: relative;
}

body.page-shop .product-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #6a7f99;
  font-size: 20px;
}

body.page-shop .product-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
}

body.page-shop .product-modal-image-wrapper {
  border-radius: 16px;
  border: 1px solid #e8eef5;
  background: #f4f8fb;
  padding: 12px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-shop .product-modal-image {
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 12px;
}

body.page-shop .product-modal-details {
  display: flex;
  flex-direction: column;
}

body.page-shop .product-modal-category {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #2f8d5f;
}

body.page-shop .product-modal-name {
  margin: 8px 0 6px;
  font-size: 24px;
  line-height: 1.2;
}

body.page-shop .product-modal-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

body.page-shop .product-modal-price {
  margin: 14px 0 0;
  font-size: 22px;
  font-weight: 700;
}

body.page-shop .product-modal-stock {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
}

body.page-shop .product-rating-overview {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  background: #f7fafc;
}

body.page-shop .product-rating-average {
  margin: 0;
  font-weight: 700;
  color: #1f3952;
}

body.page-shop .product-rating-count {
  margin: 4px 0 0;
  color: #6a7f99;
  font-size: 12px;
}

body.page-shop .product-reviews-panel {
  margin-top: 10px;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  padding: 10px;
  background: #ffffff;
}

body.page-shop .product-reviews-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.page-shop .product-reviews-header h3 {
  margin: 0;
  font-size: 15px;
  color: #1e3954;
}

body.page-shop .product-review-sort-label {
  margin-left: auto;
  color: #5c738f;
  font-size: 12px;
}

body.page-shop .product-review-sort {
  border: 1px solid #d7e2ee;
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 12px;
  color: #19324a;
  background: #ffffff;
}

body.page-shop .product-review-status {
  margin: 8px 0 6px;
  font-size: 12px;
  color: #5d748f;
  min-height: 16px;
}

body.page-shop .product-review-status.error {
  color: #a62839;
}

body.page-shop .product-review-status.warning {
  color: #9c6a10;
}

body.page-shop .product-review-status.success {
  color: #1d7c4e;
}

body.page-shop .product-reviews-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 180px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

body.page-shop .product-review-item,
body.page-shop .product-review-empty {
  border: 1px solid #eaf0f6;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fbfdff;
}

body.page-shop .product-review-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

body.page-shop .product-review-top strong {
  font-size: 13px;
  color: #13314e;
}

body.page-shop .product-review-rating {
  font-size: 12px;
  color: #5e748d;
  font-weight: 600;
}

body.page-shop .product-review-meta {
  margin: 4px 0 0;
  color: #708399;
  font-size: 11px;
}

body.page-shop .product-review-text {
  margin: 6px 0 0;
  color: #24425f;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
}

body.page-shop .product-review-form {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  background: #f9fcff;
}

body.page-shop .product-review-form label {
  font-size: 12px;
  color: #2f4963;
  font-weight: 600;
}

body.page-shop .product-review-form select,
body.page-shop .product-review-form textarea {
  border: 1px solid #d3deea;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
  color: #1d3750;
  background: #ffffff;
}

body.page-shop .product-review-form textarea {
  resize: vertical;
  min-height: 72px;
}

body.page-shop .product-review-auth-hint {
  margin: 0;
  font-size: 11px;
  color: #6e849a;
}

body.page-shop .modal-review-submit {
  border: none;
  border-radius: 999px;
  background: #264767;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 12px;
  justify-self: start;
}

body.page-shop .modal-review-submit:disabled {
  opacity: 0.65;
}

body.page-shop .product-modal-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-shop .modal-secondary-button,
body.page-shop .modal-add-to-cart {
  border: none;
  border-radius: 999px;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 600;
}

body.page-shop .modal-secondary-button {
  background: #eaf0f6;
  color: #2b4a66;
}

body.page-shop .modal-add-to-cart {
  background: var(--brand-accent);
  color: #ffffff;
}

body.page-shop .modal-add-to-cart:hover {
  background: var(--brand-accent-strong);
}

body.page-shop .modal-add-to-cart:disabled {
  background: #9aa9ba;
  cursor: not-allowed;
}

body.page-shop .toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 10px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  background: #0f2036;
  color: #ffffff;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 14px 28px rgba(8, 24, 43, 0.35);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

body.page-shop .toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.page-shop .toast.error {
  background: #9d2032;
}

/* CHECKOUT MODAL */
body.page-shop .checkout-modal {
  width: min(760px, 100%);
  padding: 20px;
  position: relative;
}

body.page-shop .checkout-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #6a7f99;
  font-size: 20px;
}

body.page-shop .checkout-modal-header h2 {
  margin: 0;
  font-size: 23px;
}

body.page-shop .checkout-modal-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

body.page-shop .checkout-items {
  margin-top: 14px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 3px;
}

body.page-shop .checkout-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #edf2f8;
  padding: 8px 0;
}

body.page-shop .checkout-item-name {
  font-size: 14px;
  font-weight: 600;
}

body.page-shop .checkout-item-meta {
  margin-top: 2px;
  color: #728299;
  font-size: 12px;
}

body.page-shop .checkout-item-price {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

body.page-shop .checkout-summary-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

body.page-shop .checkout-summary-label {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

body.page-shop .checkout-summary-note {
  margin: 4px 0 0;
  color: #728299;
  font-size: 12px;
}

body.page-shop .checkout-summary-total {
  text-align: right;
}

body.page-shop .checkout-summary-total span {
  display: block;
}

body.page-shop .checkout-summary-total span:first-child {
  font-size: 12px;
  color: #728299;
}

body.page-shop .checkout-total-amount {
  margin-top: 2px;
  font-size: 20px;
  font-weight: 700;
}

body.page-shop .checkout-actions {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.page-shop .checkout-secondary-button,
body.page-shop .checkout-primary-button {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
}

body.page-shop .checkout-secondary-button {
  background: #eaf0f6;
  color: #2b4a66;
}

body.page-shop .checkout-primary-button {
  background: var(--brand-dark);
  color: #ffffff;
}

/* ORDER SUCCESS MODAL */
body.page-shop .order-success-modal {
  width: min(520px, 100%);
  padding: 20px;
  position: relative;
  text-align: center;
}

body.page-shop .order-success-close-button {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #6a7f99;
  font-size: 20px;
}

body.page-shop .order-success-icon {
  margin: 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--success-text);
  background: var(--success-bg);
  border: 1px solid #c5ebd3;
}

body.page-shop .order-success-title {
  margin: 10px 0 6px;
  font-size: 23px;
}

body.page-shop .order-success-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

body.page-shop .order-success-summary {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}

body.page-shop .order-success-summary > div {
  border: 1px solid #e8eef5;
  background: #f8fbfd;
  border-radius: 10px;
  padding: 8px;
}

body.page-shop .order-success-label {
  display: block;
  color: #6d7f98;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 10px;
  font-weight: 700;
}

body.page-shop .order-success-value {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
}

body.page-shop .order-success-close {
  margin-top: 14px;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--brand-dark);
  color: #ffffff;
}

/* CUSTOMER ACCOUNT + ORDER HISTORY */
body.page-shop .customer-orders-btn {
  border-color: #cfdbe8;
  color: #2e4d6a;
}

body.page-shop .auth-modal {
  width: min(440px, 100%);
  padding: 20px;
  position: relative;
}

body.page-shop .auth-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #6a7f99;
  font-size: 20px;
}

body.page-shop .auth-modal-header h2 {
  margin: 0;
  font-size: 24px;
}

body.page-shop .auth-modal-header p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

body.page-shop .auth-tab-row {
  margin-top: 14px;
  display: inline-flex;
  gap: 6px;
  background: #eef3f8;
  border: 1px solid #d7e3ef;
  border-radius: 999px;
  padding: 4px;
}

body.page-shop .auth-tab {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #58708b;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
}

body.page-shop .auth-tab.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 10px 18px rgba(10, 31, 56, 0.12);
}

body.page-shop .auth-form {
  display: none;
  margin-top: 14px;
}

body.page-shop .auth-form.active {
  display: grid;
  gap: 8px;
}

body.page-shop .auth-form label {
  font-size: 12px;
  font-weight: 600;
  color: #415a74;
}

body.page-shop .auth-form input {
  width: 100%;
  border: 1px solid #cfdbe8;
  background: #ffffff;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  color: var(--text-main);
}

body.page-shop .auth-form button {
  margin-top: 6px;
  justify-self: start;
}

body.page-shop .auth-status {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 13px;
}

body.page-shop .orders-history-modal {
  width: min(760px, 100%);
  max-height: min(84vh, 760px);
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
}

body.page-shop .orders-history-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #6a7f99;
  font-size: 20px;
}

body.page-shop .orders-history-header h2 {
  margin: 0;
  font-size: 24px;
}

body.page-shop .orders-history-header p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

body.page-shop .orders-history-status {
  margin: 10px 0 0;
  min-height: 18px;
  font-size: 13px;
}

body.page-shop .orders-history-list {
  margin-top: 8px;
  overflow-y: auto;
  padding-right: 4px;
  display: grid;
  gap: 10px;
}

body.page-shop .orders-history-card {
  border: 1px solid #dce7f2;
  background: #f9fbfd;
  border-radius: 12px;
  padding: 10px;
}

body.page-shop .orders-history-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

body.page-shop .orders-history-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: #6f829b;
}

body.page-shop .orders-history-sellers {
  margin: 8px 0 0;
  font-size: 12px;
  color: #2a435f;
}

body.page-shop .orders-history-sellers span {
  font-weight: 700;
  color: #445d78;
}

body.page-shop .orders-history-items {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

body.page-shop .orders-history-items li {
  border-top: 1px solid #e4edf6;
  padding: 7px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.page-shop .orders-history-items li:first-child {
  border-top: none;
}

body.page-shop .orders-history-item-main {
  font-size: 13px;
  color: #2f4a67;
}

body.page-shop .orders-history-seller-badge {
  border-radius: 999px;
  border: 1px solid #cad9e8;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 600;
  color: #4c6480;
  background: #eef4fa;
  white-space: nowrap;
}

body.page-shop .orders-history-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.page-shop .orders-history-open-product {
  border: 1px solid #8eb5d8;
  background: #ffffff;
  color: #1f4f7a;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

body.page-shop .orders-history-open-product:hover {
  background: #edf5fc;
}

body.page-shop .orders-history-open-product:disabled {
  opacity: 0.65;
  cursor: default;
}

/* SELLER PORTAL */
body.page-seller {
  background:
    radial-gradient(1100px 480px at 90% -8%, rgba(22, 131, 86, 0.1), transparent 55%),
    radial-gradient(900px 440px at -14% 8%, rgba(33, 137, 207, 0.08), transparent 52%),
    linear-gradient(180deg, #f5f8fb 0%, #ecf3f8 100%);
}

body.page-seller .seller-main {
  padding: 28px 16px 44px;
}

body.page-seller .seller-shell {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
  animation: panel-rise 0.32s ease both;
}

body.page-seller .seller-header h1 {
  margin: 0;
  font-size: 28px;
}

body.page-seller .seller-header p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

body.page-seller .seller-tabs {
  margin-top: 16px;
  margin-bottom: 10px;
  display: inline-flex;
  gap: 6px;
  background: #edf3f9;
  border: 1px solid #dbe5f0;
  border-radius: 999px;
  padding: 4px;
}

body.page-seller .seller-tab {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #5d6f86;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
}

body.page-seller .seller-tab.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 8px 16px rgba(10, 31, 56, 0.12);
}

body.page-seller .seller-view-enter {
  animation: seller-view-fade 0.24s ease both;
}

@keyframes seller-view-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-seller .seller-view-enter {
    animation: none;
  }
}

body.page-seller .seller-form,
body.page-seller .seller-product-form {
  display: none;
  margin-top: 8px;
  border: 1px solid #dfe8f1;
  background: #f9fbfd;
  border-radius: 16px;
  padding: 12px;
}

body.page-seller .seller-form.active,
body.page-seller .seller-product-form {
  display: block;
}

body.page-seller .form-field {
  margin-bottom: 10px;
}

body.page-seller .form-field:last-child {
  margin-bottom: 0;
}

body.page-seller .form-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #40566f;
}

body.page-seller .form-field input,
body.page-seller .form-field select,
body.page-seller .form-field textarea {
  width: 100%;
  border: 1px solid #cfdbe8;
  background: #ffffff;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  color: var(--text-main);
}

body.page-seller .form-field textarea {
  min-height: 72px;
  resize: vertical;
}

body.page-seller .field-error {
  margin: 5px 0 0;
  min-height: 16px;
  font-size: 12px;
  color: var(--error-text);
}

body.page-seller .input-error {
  border-color: #d14c5c;
  background: #fff6f7;
}

body.page-seller .seller-status {
  margin: 8px 0 0;
  font-size: 13px;
}

body.page-seller .seller-status.success,
body.page-admin .admin-subtitle.success {
  color: var(--success-text);
}

body.page-seller .seller-status.warning,
body.page-admin .admin-subtitle.warning {
  color: var(--warning-text);
}

body.page-seller .seller-status.error,
body.page-admin .admin-subtitle.error {
  color: var(--error-text);
}

body.page-seller .current-seller-card {
  margin-top: 12px;
  border: 1px solid #bfe3cf;
  background: #effaf4;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.page-seller .current-seller-grid p {
  margin: 0 0 3px;
  font-size: 12px;
  color: #245f41;
}

body.page-seller .current-seller-grid p:last-child {
  margin-bottom: 0;
}

body.page-seller .seller-products {
  margin-top: 14px;
  border-top: 1px dashed #d3dfec;
  padding-top: 14px;
}

body.page-seller .seller-products-header h2 {
  margin: 0;
  font-size: 20px;
}

body.page-seller .seller-products-header .seller-status {
  margin-top: 4px;
}

body.page-seller .seller-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

body.page-seller .my-products-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

body.page-seller .my-product-row {
  border: 1px solid #dde7f2;
  background: #f9fbfd;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: card-rise 0.25s ease both;
}

body.page-seller .my-product-main h3 {
  margin: 0;
  font-size: 14px;
}

body.page-seller .my-product-main p {
  margin: 4px 0 0;
  color: #708197;
  font-size: 12px;
}

body.page-seller .my-product-actions {
  display: inline-flex;
  gap: 6px;
}

body.page-seller .empty-panel {
  border: 1px dashed #cfdbe8;
  border-radius: 12px;
  background: #f8fbfd;
  padding: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* =========================================================
   ADMIN DASHBOARD
   ======================================================= */
body.page-admin {
  background:
    radial-gradient(1300px 560px at 100% -20%, rgba(19, 96, 173, 0.1), transparent 60%),
    radial-gradient(820px 420px at -10% 12%, rgba(22, 125, 86, 0.08), transparent 55%),
    linear-gradient(180deg, #f5f8fb 0%, #ecf2f8 100%);
}

body.page-admin .admin-container,
body.page-admin .admin-main {
  padding: 28px 16px 44px;
}

body.page-admin .admin-auth-shell {
  max-width: 460px;
  margin: 0 auto;
  border: 1px solid var(--line-soft);
  background: var(--bg-surface);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
  animation: panel-rise 0.3s ease both;
}

body.page-admin .admin-auth-shell h1 {
  margin: 0;
  font-size: 28px;
}

body.page-admin .admin-auth-form {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

body.page-admin .admin-auth-form label {
  font-size: 12px;
  font-weight: 600;
  color: #48617f;
}

body.page-admin .admin-auth-form input {
  width: 100%;
  border: 1px solid #cedae8;
  border-radius: 11px;
  background: #ffffff;
  padding: 9px 10px;
  font-size: 14px;
}

body.page-admin .admin-auth-form .btn-primary {
  margin-top: 8px;
}

body.page-admin .admin-shell {
  max-width: 1120px;
  margin: 0 auto;
  border: 1px solid var(--line-soft);
  background: var(--bg-surface);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
  animation: panel-rise 0.32s ease both;
}

body.page-admin .admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

body.page-admin .admin-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.page-admin .admin-download-link {
  text-decoration: none;
}

body.page-admin .admin-header h1 {
  margin: 0;
  font-size: 29px;
}

body.page-admin .admin-subtitle {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  min-height: 18px;
}

body.page-admin .summary-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 12px;
}

body.page-admin .summary-card {
  border: 1px solid #dce7f2;
  background: linear-gradient(180deg, #fcfdff 0%, #f3f8fc 100%);
  border-radius: 14px;
  padding: 13px;
  animation: card-rise 0.25s ease both;
}

body.page-admin .summary-card.kpi-up {
  border-color: #b8e3c8;
  box-shadow: inset 0 0 0 1px rgba(31, 143, 80, 0.08);
}

body.page-admin .summary-card.kpi-down {
  border-color: #f2c3cb;
  box-shadow: inset 0 0 0 1px rgba(177, 48, 67, 0.08);
}

body.page-admin .summary-label {
  margin: 0;
  color: #6d7f98;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

body.page-admin .summary-value {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 700;
}

body.page-admin .summary-note {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

body.page-admin .summary-trend {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
}

body.page-admin .summary-trend.kpi-up {
  color: #1f8f50;
}

body.page-admin .summary-trend.kpi-down {
  color: #b13043;
}

body.page-admin .summary-trend.kpi-flat {
  color: #667d99;
}

body.page-admin .section-title {
  margin: 22px 0 8px;
  font-size: 20px;
}

body.page-admin .admin-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

body.page-admin .admin-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #4c6584;
}

body.page-admin .admin-filter-field.admin-filter-field-wide {
  grid-column: span 2;
}

body.page-admin .admin-filter-field input,
body.page-admin .admin-filter-field select {
  border: 1px solid #cfdae8;
  border-radius: 11px;
  background: #ffffff;
  padding: 8px 9px;
  font-size: 13px;
  color: #1b324f;
}

body.page-admin .admin-filter-actions {
  display: flex;
  align-items: flex-end;
}

body.page-admin .admin-filter-actions .btn-outline {
  width: 100%;
}

body.page-admin .admin-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.page-admin .chart-card {
  border: 1px solid #dbe6f2;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-radius: 14px;
  padding: 12px;
}

body.page-admin .chart-card-wide {
  grid-column: 1 / -1;
}

body.page-admin .chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body.page-admin .chart-card-header h3 {
  margin: 0;
  font-size: 15px;
}

body.page-admin .chart-granularity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4d6584;
}

body.page-admin .chart-granularity select {
  border: 1px solid #cfdae8;
  border-radius: 999px;
  padding: 4px 10px;
  background: #ffffff;
  font-size: 12px;
}

body.page-admin .admin-chart-canvas {
  display: block;
  width: 100%;
  border: 1px solid #e3ebf5;
  border-radius: 10px;
  background: #ffffff;
}

body.page-admin .table-wrap {
  overflow-x: hidden;
  border: 1px solid #dce7f2;
  border-radius: 12px;
  background: #ffffff;
}

body.page-admin .admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 0;
  table-layout: fixed;
}

body.page-admin .admin-table th,
body.page-admin .admin-table td {
  border-bottom: 1px solid #e6edf5;
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

body.page-admin .admin-table th {
  background: #f6fafe;
  color: #5e7189;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.page-admin .admin-table tr:last-child td {
  border-bottom: none;
}

body.page-admin #seller-rows .seller-row-clickable {
  cursor: pointer;
}

body.page-admin #seller-rows .seller-row-clickable td {
  transition: background-color 0.15s ease;
}

body.page-admin #seller-rows .seller-row-clickable:hover td {
  background: #f3f8fd;
}

body.page-admin #seller-rows .seller-row-clickable:focus-visible {
  outline: 2px solid rgba(27, 157, 98, 0.4);
  outline-offset: -2px;
}

body.page-admin #seller-rows .seller-row-clickable.seller-row-active td {
  background: #eaf4ff;
}

body.page-admin .seller-detail-panel {
  margin-top: 12px;
  border: 1px solid #d8e4f1;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 12px;
}

body.page-admin .seller-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.page-admin .seller-detail-header h3 {
  margin: 0;
  font-size: 18px;
}

body.page-admin .seller-detail-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.page-admin .seller-detail-kpis {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

body.page-admin .seller-detail-kpi {
  border: 1px solid #dee8f4;
  border-radius: 10px;
  background: #fcfdff;
  padding: 8px;
}

body.page-admin .seller-detail-kpi-label {
  display: block;
  font-size: 11px;
  color: #6b7f99;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

body.page-admin .seller-detail-kpi-value {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  color: #203952;
}

body.page-admin .seller-detail-content {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 12px;
}

body.page-admin .seller-detail-section h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

body.page-admin .seller-detail-table-wrap {
  max-height: 320px;
  overflow: auto;
}

body.page-admin .seller-detail-orders-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 3px;
}

body.page-admin .seller-detail-order-card {
  border: 1px solid #dce7f2;
  background: #ffffff;
  border-radius: 10px;
  padding: 9px;
}

body.page-admin .seller-detail-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.page-admin .seller-detail-order-meta {
  margin: 6px 0 0;
  color: #6e7f98;
  font-size: 12px;
}

body.page-admin .seller-detail-order-items {
  margin: 8px 0 0;
  padding-left: 18px;
}

body.page-admin .seller-detail-order-items li {
  margin-bottom: 4px;
}

body.page-admin #orders-list {
  display: grid;
  gap: 10px;
}

body.page-admin .orders-pager {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d9e5f1;
  background: #f8fbfe;
  border-radius: 12px;
  padding: 10px 12px;
}

body.page-admin .orders-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #4f6784;
  font-weight: 600;
}

body.page-admin .orders-page-size select {
  border: 1px solid #cfdae8;
  border-radius: 999px;
  padding: 4px 10px;
  background: #ffffff;
  font-size: 12px;
  color: #1b324f;
}

body.page-admin .orders-page-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.page-admin .orders-page-indicator {
  min-width: 90px;
  text-align: center;
  font-size: 12px;
  color: #526b88;
  font-weight: 600;
}

body.page-admin .order-card {
  border: 1px solid #dce7f2;
  background: linear-gradient(180deg, #fdfefe 0%, #f4f8fc 100%);
  border-radius: 12px;
  padding: 12px;
  animation: card-rise 0.22s ease both;
}

body.page-admin .order-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.page-admin .order-meta {
  margin: 6px 0 0;
  color: #6e7f98;
  font-size: 12px;
}

body.page-admin .order-sellers {
  margin-top: 8px;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

body.page-admin .order-sellers-label {
  color: #506a88;
  font-weight: 600;
}

body.page-admin .order-items-wrap {
  margin-top: 10px;
  font-size: 13px;
}

body.page-admin .order-items-list {
  margin: 0;
  padding-left: 18px;
}

body.page-admin .order-items-list li {
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

body.page-admin .order-item-text {
  color: #1f3654;
  min-width: 0;
}

body.page-admin .order-highlight {
  background: #ffef9f;
  color: #3a3308;
  border-radius: 3px;
  padding: 0 2px;
}

body.page-admin .badge,
body.page-admin .badge-secondary,
body.page-admin .seller-chip {
  border-radius: 999px;
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

body.page-admin .badge {
  background: #e8eef9;
  color: #2c4a79;
}

body.page-admin .badge-secondary {
  background: #e7f6ec;
  color: #1e6e45;
}

body.page-admin .seller-chip {
  background: #ebf1f8;
  color: #38577d;
}

body.page-admin .notifications-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

body.page-admin .notifications-list {
  display: grid;
  gap: 8px;
}

body.page-admin .notification-item {
  border: 1px solid #dce7f2;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
  animation: card-rise 0.2s ease both;
}

body.page-admin .notification-item.notification-warning {
  border-color: #efd9ae;
  background: #fffdf6;
}

body.page-admin .notification-item.notification-error {
  border-color: #efc8cf;
  background: #fff8f9;
}

body.page-admin .notification-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-admin .notification-type {
  font-size: 12px;
  text-transform: capitalize;
  color: #516884;
  font-weight: 600;
}

body.page-admin .notification-time {
  margin-left: auto;
  font-size: 12px;
  color: #6f829b;
}

body.page-admin .notification-message {
  margin: 7px 0 0;
  color: #1f3654;
  font-size: 13px;
}

body.page-admin .notification-meta {
  margin: 6px 0 0;
  color: #617a95;
  font-size: 12px;
  word-break: break-word;
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-pop {
  from {
    opacity: 0.7;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* RESPONSIVE */
@media (min-width: 1081px) {
  body.page-shop.drawer-open {
    overflow-y: auto;
  }

  body.page-shop.drawer-open .page-grid {
    margin-right: calc(var(--cart-drawer-width) + 18px);
  }

  body.page-shop .cart-drawer-backdrop {
    display: none;
  }
}

@media (max-width: 1080px) {
  body.page-shop .page-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.page-shop .sidebar-left {
    position: static;
  }

  body.page-admin .admin-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.page-admin .admin-filter-field.admin-filter-field-wide {
    grid-column: auto;
  }

  body.page-admin .seller-detail-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.page-admin .seller-detail-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.page-shop .product-modal-layout {
    grid-template-columns: 1fr;
  }

  body.page-shop .product-modal-image-wrapper {
    min-height: 240px;
  }
}

@media (max-width: 820px) {
  body.page-shop {
    --cart-drawer-top-offset: 114px;
    --cart-drawer-bottom-gap: 10px;
  }

  .top-bar {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  body.page-shop .top-bar-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  body.page-shop .customer-greeting {
    max-width: 220px;
    text-align: center;
  }

  body.page-shop .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-seller .current-seller-card,
  body.page-seller .my-product-row {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-seller .my-product-actions {
    justify-content: flex-start;
  }

  body.page-admin .admin-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.page-admin .admin-charts {
    grid-template-columns: 1fr;
  }

  body.page-admin .chart-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  body.page-shop .cart-drawer-panel {
    width: 100%;
    padding: 12px;
  }

  body.page-shop .checkout-summary-row {
    flex-direction: column;
    align-items: flex-start;
  }

  body.page-shop .checkout-summary-total {
    text-align: left;
  }

  body.page-shop .order-success-summary {
    grid-template-columns: 1fr;
  }

  body.page-shop .orders-history-items li {
    flex-direction: column;
    align-items: flex-start;
  }

  body.page-shop .orders-history-item-actions {
    justify-content: flex-start;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  body.page-shop .product-reviews-header {
    align-items: flex-start;
  }

  body.page-shop .product-review-sort-label {
    margin-left: 0;
  }

  body.page-shop .product-review-top {
    flex-direction: column;
    align-items: flex-start;
  }

  body.page-admin .admin-auth-shell {
    padding: 16px;
    border-radius: 18px;
  }

  body.page-admin .admin-header {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-admin .admin-header-actions {
    width: 100%;
  }

  body.page-admin .admin-header-actions .btn-outline {
    flex: 1;
  }

  body.page-admin .seller-detail-header {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-admin .seller-detail-actions {
    width: 100%;
  }

  body.page-admin .seller-detail-actions .btn-outline {
    flex: 1;
  }

  body.page-admin .admin-controls {
    grid-template-columns: 1fr;
  }

  body.page-admin .admin-filter-actions {
    align-items: stretch;
  }

  body.page-admin .summary-grid {
    grid-template-columns: 1fr;
  }

  body.page-admin .notifications-controls {
    align-items: stretch;
  }

  body.page-admin .notification-time {
    margin-left: 0;
    width: 100%;
  }

  body.page-admin .table-wrap {
    overflow-x: visible;
  }

  body.page-admin .admin-table {
    font-size: 12px;
  }

  body.page-admin .admin-table th,
  body.page-admin .admin-table td {
    padding: 8px 6px;
  }

  body.page-admin .order-top-row {
    align-items: flex-start;
    flex-direction: column;
  }

  body.page-admin .order-items-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  body.page-admin .chart-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  body.page-admin .orders-pager {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-admin .orders-page-controls {
    justify-content: space-between;
  }

  body.page-admin .seller-detail-kpis {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body.page-shop .product-grid {
    grid-template-columns: 1fr;
  }

  body.page-shop .product-card,
  body.page-shop .checkout-modal,
  body.page-shop .product-modal,
  body.page-shop .order-success-modal,
  body.page-shop .auth-modal,
  body.page-shop .orders-history-modal {
    padding: 14px;
  }

  body.page-shop .checkout-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-shop .cart-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body.page-seller .seller-shell,
  body.page-admin .admin-shell {
    padding: 14px;
    border-radius: 16px;
  }
}
