@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Manrope:wght@500;600;700;800;900&display=swap');

:root {
  --premium-cream: #fff7ed;
  --premium-cream-2: #f8eee1;
  --premium-card: rgba(255, 252, 246, 0.92);
  --premium-bronze: #8a552e;
  --premium-bronze-dark: #3f2516;
  --premium-gold: #d8a158;
  --premium-text: #24160f;
  --premium-muted: #7f7066;
  --premium-border: rgba(138, 85, 46, 0.18);
  --premium-shadow: 0 20px 46px rgba(63, 37, 22, 0.14);
  --premium-font-title: 'Cormorant Garamond', Georgia, serif;
  --premium-font-ui: 'Manrope', var(--font-family);
}

/* New generated card art */
.ai-banner {
  border-color: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 38px rgba(49, 70, 69, 0.13);
}

.ai-banner-pixar {
  background:
    linear-gradient(90deg, rgba(243, 252, 250, 0.96) 0%, rgba(238, 247, 252, 0.9) 43%, rgba(238, 247, 252, 0.34) 68%, rgba(238, 247, 252, 0.08) 100%),
    url('../images/ai/pixar-card-background.webp') right center / auto 100% no-repeat,
    linear-gradient(135deg, #e6fbf5 0%, #fff0db 100%);
}

.ai-banner-story {
  background:
    linear-gradient(90deg, rgba(255, 244, 220, 0.96) 0%, rgba(255, 244, 220, 0.9) 43%, rgba(255, 244, 220, 0.34) 68%, rgba(255, 244, 220, 0.08) 100%),
    url('../images/ai/story-card-background.webp') right center / auto 100% no-repeat,
    linear-gradient(135deg, #fff4dc 0%, #f8d8ac 100%);
}

.ai-banner h3 {
  font-family: var(--premium-font-ui);
  letter-spacing: 0;
}

.ai-banner-story h3::after {
  content: none;
}

.ai-banner-btn {
  color: var(--premium-bronze-dark);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 9px 22px rgba(63, 37, 22, 0.12);
}

.ai-banner-decor {
  right: -6px;
  width: 132px;
  opacity: 1;
}

.ai-decor-pixar::after,
.ai-decor-story::after {
  content: '';
  position: absolute;
  inset: -7px -8px -9px 0;
  background-position: right bottom;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 14px 18px rgba(63, 37, 22, 0.16));
}

.ai-decor-pixar::after {
  content: none;
}

.ai-decor-story::after {
  content: none;
}

/* Catalog & Reviews: add the same scenic depth as the home screen without changing product logic */
.catalog-section,
.reviews-section {
  position: relative;
  overflow-x: hidden;
  background: transparent !important; /* Прозрачный фон для отображения закатного здания */
}

.catalog-section::before,
.reviews-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 238px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.0) 100%);
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.catalog-section > .container {
  position: relative;
  z-index: 1;
}

/* ── Night Mode — scenic headers каталога и отзывов ── */
body.night-mode .catalog-section::before,
body.night-mode .reviews-section::before {
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.18) 0%, rgba(8, 12, 18, 0.0) 100%) !important;
  opacity: 0.8;
}

.catalog-review-teaser {
  background:
    radial-gradient(circle at 88% 16%, rgba(216, 161, 88, 0.28), transparent 30%),
    linear-gradient(135deg, #0d5258 0%, #083b40 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 38px rgba(13, 82, 88, 0.2);
}

.product-card {
  border-color: rgba(15, 125, 134, 0.08);
  box-shadow: 0 14px 30px rgba(24, 69, 72, 0.08);
}

/* Keep dense size runs stable on the product detail screen. */
.pd-sizes {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  padding-left: 10px;
  padding-right: 10px;
  overflow-x: auto;
}

.pd-size {
  flex: 1 1 0;
  min-width: 0;
  font-size: clamp(10px, 2.9vw, 12px);
}

.pd-size.selected {
  transform: none;
}

/* Admin: premium but compatible with existing tabs/forms/scripts */
.admin-section {
  position: relative;
  overflow-x: hidden;
  background: transparent !important; /* Прозрачный фон для отображения закатного здания */
  font-family: var(--premium-font-ui);
}

.admin-section::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 248px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.0) 100%);
  opacity: 0.5;
  pointer-events: none;
}

.admin-section > .container {
  position: relative;
  z-index: 1;
}

.admin-header {
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-title {
  font-family: var(--premium-font-title);
  color: var(--premium-text);
  font-size: 36px;
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: 0;
}

.admin-role-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid var(--premium-border);
  color: var(--premium-bronze);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(63, 37, 22, 0.08);
}

.admin-actions .btn-icon {
  border-radius: 14px;
  color: var(--premium-bronze);
  background: rgba(255, 250, 242, 0.78);
  border: 1px solid var(--premium-border);
  box-shadow: 0 10px 24px rgba(63, 37, 22, 0.08);
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 22px;
  padding: 6px;
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.78);
  border: 1px solid var(--premium-border);
  box-shadow: var(--premium-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.admin-tab {
  min-height: 62px;
  padding: 8px 4px;
  border-radius: 19px;
  color: rgba(36, 22, 15, 0.72);
  font-size: 12px;
  line-height: 1.15;
  font-weight: 850;
  white-space: normal;
}

.admin-tab.active {
  color: #fff8ee;
  background:
    radial-gradient(circle at 72% 12%, rgba(216, 161, 88, 0.36), transparent 34%),
    linear-gradient(135deg, var(--premium-bronze-dark), #1f130d);
  box-shadow: 0 14px 30px rgba(63, 37, 22, 0.22);
}

.admin-section .input,
.admin-section .textarea,
.admin-section .form-select {
  border-radius: 22px;
  border-color: var(--premium-border);
  background: rgba(255, 252, 246, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 12px 28px rgba(63, 37, 22, 0.08);
}

.sale-search-wrapper .input-search {
  height: 60px;
  padding-left: 48px;
  font-weight: 750;
  color: var(--premium-text);
}

.sale-search-wrapper {
  position: relative;
}

.sale-search-wrapper::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 20px;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 2.4px solid rgba(63, 37, 22, 0.64);
  border-radius: 50%;
  box-sizing: border-box;
}

.sale-search-wrapper::after {
  content: '';
  position: absolute;
  left: 33px;
  top: 36px;
  z-index: 1;
  width: 9px;
  height: 2.4px;
  border-radius: 999px;
  background: rgba(63, 37, 22, 0.64);
  transform: rotate(45deg);
}

.empty-state {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.empty-state-icon {
  width: min(74vw, 310px);
  height: 286px;
  margin-bottom: 8px;
  color: transparent;
  font-size: 0;
  background: url('../images/ai/admin-empty-search-luxury.webp') center bottom / contain no-repeat;
  filter: drop-shadow(0 18px 24px rgba(63, 37, 22, 0.12));
}

.empty-state-title {
  max-width: 330px;
  margin: 0 auto;
  color: var(--premium-text);
  font-family: var(--premium-font-title);
  font-size: 31px;
  line-height: 1.02;
  font-weight: 700;
}

.empty-state-text {
  margin-top: 9px;
  color: var(--premium-muted);
  font-size: 15px;
  font-weight: 700;
}

.sale-quick-stats-row,
.sale-card,
.history-stat-card,
.history-item,
.activity-item,
.admin-product-item,
.photo-upload-area {
  border-radius: 22px;
  border-color: var(--premium-border);
  background: rgba(255, 252, 246, 0.9);
  box-shadow: 0 12px 28px rgba(63, 37, 22, 0.08);
}

.sale-size-btn,
.size-stock-item label,
.size-stock-item input[type="number"],
.photo-preview,
.photo-preview-badge,
.activity-role,
.sale-card-stock {
  border-radius: 14px;
}

.sale-size-btn.selected,
.size-stock-item input[type="checkbox"]:checked + label,
.filter-chip.active {
  background: linear-gradient(135deg, #0f7d86, #7b552f);
  border-color: transparent;
}

.admin-products-title,
#admin-form-title {
  color: var(--premium-text);
  font-family: var(--premium-font-title);
  font-size: 27px !important;
  line-height: 1;
  font-weight: 700 !important;
}

.admin-login-card {
  border-radius: 28px;
  border-color: var(--premium-border);
  background: rgba(255, 252, 246, 0.92);
  box-shadow: var(--premium-shadow);
}

.admin-login-icon {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 70% 16%, rgba(216, 161, 88, 0.34), transparent 35%),
    linear-gradient(135deg, #fff7ed, #ebd7bd);
  box-shadow: 0 16px 34px rgba(63, 37, 22, 0.14);
}

.admin-login-title {
  font-family: var(--premium-font-title);
  color: var(--premium-text);
  font-size: 31px;
}

@media (max-width: 380px) {
  .admin-title {
    font-size: 31px;
  }

  .admin-tab {
    min-height: 56px;
    font-size: 11px;
  }

  .empty-state-icon {
    height: 246px;
  }

  .empty-state-title {
    font-size: 27px;
  }
}
