@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&display=swap');

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #2c2c2c;
  background: #f8f6f3;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e8e4df;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #8b6f4e, #c4a77d, #8b6f4e);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.logo:hover { opacity: 0.85; }

.logo-img {
  height: 65px;
  width: auto;
  display: block;
  max-width: 220px;
  object-fit: contain;
}

.admin-header .logo-img {
  filter: brightness(0) invert(1);
}

.admin-header .logo {
  gap: 0.5rem;
  font-size: 1rem;
}

.logo span { color: #8b6f4e; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav a {
  margin-left: 0;
  padding: 0.4rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #555;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: #8b6f4e;
  border-radius: 2px;
  transition: transform 0.25s ease;
}

.nav a:hover {
  color: #8b6f4e;
  background: rgba(139,111,78,0.06);
}

.nav a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.nav a.nav-page-link {
  font-weight: 500;
  color: #777;
}

.nav a.nav-page-link:hover {
  color: #8b6f4e;
}

.nav-sep {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: #e0dbd5;
  margin: 0 0.2rem;
  vertical-align: middle;
}

/* Header Search */
.header-search {
  position: relative;
  flex: 1;
  max-width: 360px;
  min-width: 160px;
  order: 2;
}
.header-search .search-wrapper {
  width: 100%;
}
.header-search .search-wrapper input {
  width: 100%;
  font-size: 0.95rem;
  padding: 0.5rem 1rem 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #f7f5f2;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search .search-wrapper input:focus {
  border-color: #8b6f4e;
  box-shadow: 0 0 0 3px rgba(139,111,78,0.1);
}
.header-search-toggle {
  display: none;
}
.search-toggle-label { display: none; }
.header-search-drop {
  position: relative;
  display: none;
  padding: 0.5rem 1rem 0.8rem;
  border-top: 1px solid #e8e4df;
  background: #faf9f7;
}
.header-search-drop:not(.hidden) {
  display: block;
}
.header-search-drop .search-wrapper {
  width: 100%;
}
.header-search-drop .search-wrapper input {
  width: 100%;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fff;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e8e4df;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  z-index: 200;
  max-height: 420px;
  overflow-y: auto;
}
.search-suggestions.hidden { display: none; }

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f5f2ef;
}
.search-suggestion-item:hover { background: #f9f7f4; }
.search-suggestion-item:last-of-type { border-bottom: none; }

.search-suggestion-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #f0eeeb;
}
.search-suggestion-info {
  flex: 1;
  min-width: 0;
}
.sug-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sug-detail {
  font-size: 0.78rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestion-more {
  display: block;
  padding: 0.6rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #8b6f4e;
  cursor: pointer;
  text-decoration: none;
  border-top: 1px solid #e8e4df;
}
.search-suggestion-more:hover { background: #f9f7f4; }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
#headerDropdown { display: flex; align-items: center; }
#headerDropdown .dropdown-trigger { padding: 0.4rem 0.8rem; font-weight: 600 !important; cursor: pointer; white-space: nowrap; color: #555; border-radius: 6px; font-size: 0.95rem; transition: color 0.2s, background 0.2s; }
#headerDropdown .dropdown-trigger:hover { color: #333; background: rgba(139,111,78,0.06); }
.dropdown-arrow { font-size: 0.65rem; margin-left: 0.3rem; transition: transform 0.2s; }
.dropdown:hover .dropdown-arrow { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: calc(100% + 0.5rem); left: 0; z-index: 100;
  background: #fff; border-radius: 0 0 10px 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  min-width: 240px; padding: 0.6rem 0; display: none;
  border: 1px solid #f0eeeb;
}
.dropdown-menu a {
  display: block; padding: 0.6rem 1.4rem;
  font-weight: 500; font-size: 0.9rem; color: #444; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
}
.dropdown-menu a::before {
  content: '•';
  margin-right: 0.5rem;
  color: #8b6f4e;
}
.dropdown-menu a:hover {
  background: #f9f7f5;
  color: #8b6f4e;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a.dropdown-all {
  font-weight: 600;
  border-bottom: 1px solid #f0eeeb;
  padding-bottom: 0.7rem;
  margin-bottom: 0.3rem;
}
.dropdown-menu a.dropdown-all::before {
  content: none;
}

/* Hero / Slideshow */
.hero {
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 2.8rem; font-weight: 700; margin-bottom: 1rem; text-shadow: 0 2px 8px rgba(0,0,0,0.3); letter-spacing: 0.01em; }
.hero p { font-size: 1.1rem; opacity: 0.95; max-width: 600px; margin: 0 auto; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }

.hero-slideshow {
  padding: 0;
  max-width: 1200px;
  margin: 1.5rem auto 0;
  border-radius: 16px;
  overflow: hidden;
}

.slideshow-container {
  position: relative;
  min-height: 420px;
}

.slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide[data-link] {
  cursor: pointer;
}

.slide[data-link]:hover .slide-bg::after {
  background: rgba(0,0,0,0.45);
}

.slide-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: center/cover no-repeat;
}

.slide-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.slide-content {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
  width: 100%;
}

.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.slide-arrow:hover { background: rgba(0,0,0,0.6); }

.slide-arrow-prev { left: 1rem; }
.slide-arrow-next { right: 1rem; }

.slide-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.slide-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.slide-dot.active { background: #fff; }
.slide-dot:hover { background: rgba(255,255,255,0.8); }

/* Header Notice Bar */
.header-notice {
  background: #c0392b;
  color: #fff;
  text-align: center;
  padding: 0.45rem 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
}
.header-notice a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.header-notice a:hover {
  color: #ffe0e0;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem 2rem;
}

/* Category Nav */
.category-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  justify-content: center;
}

.category-nav a {
  display: block;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid #e0dbd5;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  transition: all 0.2s;
  text-decoration: none;
}

.category-nav a:hover {
  background: #8b6f4e;
  color: #fff;
  border-color: #8b6f4e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139,111,78,0.25);
}

.category-nav a.active {
  background: #8b6f4e;
  color: #fff;
  border-color: #8b6f4e;
}

.category-nav .back-to-all {
  display: block;
  padding: 0.35rem 0.8rem;
  background: none;
  border: 1px solid #d0ccc7;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #8b6f4e;
  transition: all 0.2s;
  text-decoration: none;
}

.category-nav .back-to-all:hover {
  background: #f4f0eb;
  border-color: #8b6f4e;
}

.category-nav .sub-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.category-nav .sub-cat {
  display: block;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid #e0dbd5;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  transition: all 0.2s;
  text-decoration: none;
}

.category-nav .sub-cat:hover {
  background: #8b6f4e;
  color: #fff;
  border-color: #8b6f4e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139,111,78,0.25);
}

.category-nav .sub-cat.active {
  background: #8b6f4e;
  color: #fff;
  border-color: #8b6f4e;
}

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filters select,
.filters input {
  padding: 0.6rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  flex: 1;
  min-width: 180px;
}

.filters select:focus,
.filters input:focus {
  outline: none;
  border-color: #8b6f4e;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 220px;
}

.filter-price input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.6rem;
  -moz-appearance: textfield;
}
.filter-price input::-webkit-outer-spin-button,
.filter-price input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.filter-sep {
  color: #999;
  font-size: 0.9rem;
  flex-shrink: 0;
}

#statusFilter {
  flex: 1;
  min-width: 190px;
  max-width: 220px;
}

.filters .search-wrapper {
  flex: 1;
  min-width: 180px;
}
.filters .search-wrapper input {
  width: 100%;
}
.filter-price .search-wrapper {
  min-width: 0;
}

@media (max-width: 600px) {
  .filter-group {
    min-width: 100%;
  }
  .filter-price .search-wrapper input {
    padding: 0.45rem 0.35rem;
    font-size: 0.8rem;
  }
  .filter-sep {
    display: none;
  }
  #statusFilter {
    max-width: none;
  }
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.product-card img {
  height: 220px;
  width: 100%;
  object-fit: cover;
}

.product-card .image-note {
  font-size: 0.7rem;
  color: #aaa;
  text-align: center;
  padding: 0.3rem 0.5rem;
  line-height: 1.3;
}

.product-info {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card .category-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8b6f4e;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.product-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.product-card .description {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 0.8rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c2c2c;
  margin-bottom: 0.3rem;
}

.price-note {
  font-size: 0.7rem;
  color: #999;
  font-weight: 400;
}

.status-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 0.7rem;
  width: fit-content;
}

.status-instock {
  background: #e6f7e6;
  color: #2d7a2d;
}

.status-outofstock {
  background: #fde8e8;
  color: #b33a3a;
}

.status-orderable {
  background: #fff3e0;
  color: #b3741a;
}

.product-card .btn {
  margin-top: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.btn-primary {
  background: #8b6f4e;
  color: #fff;
  box-shadow: 0 2px 8px rgba(139,111,78,0.3);
  transition: all 0.25s;
}

.btn-primary:hover {
  background: #735a3d;
  box-shadow: 0 4px 16px rgba(139,111,78,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #eee;
  color: #333;
}

.btn-secondary:hover { background: #ddd; }

.btn-danger {
  background: #d32f2f;
  color: #fff;
}

.btn-danger:hover { background: #b71c1c; }

.btn-small {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.btn-icon {
  padding: 0.4rem 0.55rem;
  line-height: 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: #fff;
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

.modal-image {
  width: 90vw;
  max-width: 1000px;
  padding: 0;
  overflow: hidden;
}

.modal-image #modalContent {
  padding: 0;
  line-height: 0;
}

.modal-image #modalContent img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

.modal-image .modal-close {
  color: #fff;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0.5rem;
  right: 0.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.modal-close:hover { color: #333; }

.modal img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.modal .category-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8b6f4e;
  font-weight: 600;
}

.modal h2 { font-size: 1.6rem; margin: 0.3rem 0; }
.modal .price { font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0; }
.modal .description { font-size: 0.95rem; line-height: 1.7; color: #555; }

/* Product detail page */
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #8b6f4e;
  font-weight: 600;
  transition: transform 0.2s, opacity 0.2s;
}

.back-link:hover {
  text-decoration: underline;
  transform: translateX(-3px);
}

.product-detail {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.product-detail-top {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .product-detail-top {
    flex-direction: column;
  }
}

.product-detail-image {
  max-width: 550px;
  flex: 1;
  min-width: 0;
}

.product-detail-header {
  flex: 1;
  min-width: 0;
}

.product-detail-image #detailMainImg {
  width: 100%;
  max-height: 500px;
  height: auto;
  object-fit: contain;
  background: #f5f3f0;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-detail-image #detailMainImg:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* Variants - admin form */
.variant-row {
  border: 1px solid #e8e4df;
  border-radius: 6px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: #faf9f7;
  transition: opacity 0.15s, border-color 0.15s;
}

.variant-row.dragging {
  opacity: 0.4;
}

.variant-row.drag-over {
  border-top: 2px solid #8b6f4e;
}

.variant-row .drag-handle {
  cursor: grab;
  color: #ccc;
  font-size: 1rem;
  line-height: 1;
  user-select: none;
  padding: 0 0.2rem;
}

.variant-row .drag-handle:active {
  cursor: grabbing;
}

.variant-row input[type="text"] {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
}

.variant-row .v-upload-btn { font-size: 0.8rem; }

/* Variant selector - product detail */
.variant-selector {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
}

.variant-option {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: #fff;
  border: 1px solid #d0ccc7;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.variant-option:hover {
  border-color: #8b6f4e;
  color: #8b6f4e;
  background: #f9f7f5;
}

.variant-option.active {
  background: #8b6f4e;
  color: #fff;
  border-color: #8b6f4e;
}

.thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.thumb-img {
  width: 100px;
  height: 75px;
  object-fit: contain;
  background: #f5f3f0;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.25s;
}

.thumb-img:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.thumb-img.active {
  opacity: 1;
  border-color: #8b6f4e;
  box-shadow: 0 2px 8px rgba(139,111,78,0.25);
  transform: translateY(-1px);
}

#availJumpBtn {
  display: block;
  margin-left: auto;
  width: fit-content;
  transition: transform 0.2s;
}

#availJumpBtn:hover {
  transform: translateY(-1px);
}

.product-detail-header .category-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #8b6f4e;
  font-weight: 700;
  background: #f4f0eb;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.product-detail-header h2 {
  font-size: 1.65rem;
  margin: 0.3rem 0 0.4rem;
  letter-spacing: -0.3px;
}

.product-detail-header .price {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0.8rem 0 0.2rem;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}

.product-detail-header .item-number {
  font-size: 0.8rem;
  color: #999;
  margin: 0 0 0.2rem;
}

.product-detail-header .price-note {
  font-size: 0.75rem;
  color: #999;
}

.product-detail-body {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e8e4df;
}

.product-detail-body .description {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
}

.availability-form {
  margin-top: 1.5rem;
  padding: 1.75rem;
  border: 1px solid #e8e4df;
  border-radius: 10px;
  background: #faf9f7;
}

.availability-form h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #2c2c2c;
}

/* Admin image gallery */
.image-gallery {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.gallery-item {
  position: relative;
  width: 100px;
  height: 70px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.gallery-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #d32f2f;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-remove:hover { background: #b71c1c; }

/* Mobile: stack product detail */
@media (max-width: 768px) {
  .hero-slideshow { margin: 0; border-radius: 0; }
  .slideshow-container, .slide { min-height: 280px; }
  .hero h1 { font-size: 1.7rem; }
  .header-inner { padding: 0.35rem 0.75rem !important; flex-wrap: wrap; gap: 0.3rem; }
  .logo { flex: 0 0 auto; }
  .logo-img { height: 40px; max-width: 140px; }
  #headerDropdown { order: 2; }
  #headerDropdown .dropdown-trigger { padding: 0.35rem 0.5rem !important; font-size: 0.85rem !important; }
  .dropdown-arrow { font-size: 0.6rem; margin-left: 0.2rem; }
  .dropdown-menu { left: 50%; right: auto; transform: translateX(-50%); min-width: 200px; max-width: calc(100vw - 2rem); }
  .nav { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; width: 100%; order: 4; padding-top: 0.1rem; min-height: 36px; }
  .nav a { padding: 0.35rem 0.5rem; font-size: 0.8rem; min-height: 34px; display: flex; align-items: center; white-space: nowrap; }
  .nav-sep { display: none; }
  .header-search { display: none; }
  .header-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: auto;
    height: 32px;
    border: none;
    background: none;
    color: #555;
    cursor: pointer;
    border-radius: 6px;
    order: 3;
    margin-left: auto;
    padding: 0 0.35rem;
  }
  .search-toggle-label { display: inline; font-size: 0.8rem; font-weight: 500; }
  .header-search-toggle:hover {
    background: rgba(139,111,78,0.08);
  }
  .container { padding: 0.75rem 1rem 1.5rem; }
  .product-detail {
    padding: 1rem;
  }
  .product-detail-image #detailMainImg {
    max-height: 350px;
    height: auto;
  }
  .product-detail-body {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }
  .product-detail-header h2 {
    font-size: 1.4rem;
  }
  .product-detail-header .price {
    font-size: 1.5rem;
  }
  .dropdown-menu {
    min-width: 220px;
    padding: 0.4rem 0;
  }
  .dropdown-menu a {
    padding: 0.65rem 1.2rem;
    font-size: 0.9rem;
  }
  .dropdown-menu a.dropdown-all {
    padding-bottom: 0.65rem;
    margin-bottom: 0.2rem;
  }
}

@media (max-width: 480px) {
  .header-inner { padding: 0.25rem 0.5rem !important; gap: 0.2rem; }
  .logo-img { height: 34px; max-width: 120px; }
  #headerDropdown .dropdown-trigger { padding: 0.3rem 0.4rem !important; font-size: 0.8rem !important; }
  .nav { gap: 0.2rem; min-height: 34px; }
  .nav a { font-size: 0.75rem; padding: 0.3rem 0.4rem; min-height: 32px; }
  .slideshow-container, .slide { min-height: 220px; }
  .hero h1 { font-size: 1.4rem; }
  .container { padding: 0.5rem 0.75rem 1rem; }
  .thumb-img {
    width: 80px;
    height: 60px;
  }
  .product-detail-image #detailMainImg {
    height: 260px;
  }
  .product-detail-body {
    margin-top: 1rem;
    padding-top: 1rem;
  }
  .dropdown-menu {
    min-width: 200px;
  }
  .dropdown-menu a {
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
  }
  .dropdown-menu a.dropdown-all {
    padding-bottom: 0.6rem;
  }
}



.form-group {
  margin-bottom: 0.8rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #555;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8b6f4e;
  box-shadow: 0 0 0 3px rgba(139,111,78,0.15);
}

.form-group textarea { resize: vertical; min-height: 60px; }

.form-row {
  display: flex;
  gap: 0.8rem;
}

.form-row .form-group { flex: 1; }

.alert {
  padding: 0.8rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-success { background: #e6f7e6; color: #2d7a2d; }
.alert-error { background: #fde8e8; color: #b33a3a; }

/* Admin Styles */
.admin-body { background: #f0eeeb; }

.admin-header {
  background: #2c2c2c;
  color: #fff;
  padding: 0.6rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header .logo { font-size: 1.2rem; }
.admin-header .logo span { color: #c4a77d; }

.admin-nav a {
  color: #ccc;
  margin-left: 1.5rem;
  font-size: 0.85rem;
}

.admin-nav a:hover { color: #fff; }

.admin-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  line-height: 1;
}

.admin-menu-toggle:hover { color: #fff; }

@media (max-width: 768px) {
  .admin-menu-toggle { display: block; }

  .admin-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    background: #3a3a3a;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    flex-direction: column;
    min-width: 180px;
    z-index: 200;
    overflow: hidden;
  }

  .admin-nav.open { display: flex; }

  .admin-nav a {
    margin: 0;
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
  }

  .admin-nav a:last-child { border-bottom: none; }

  .admin-header { position: relative; }
}

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-main h2 { margin-bottom: 1.5rem; }

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-filters {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-filters input[type="text"],
.admin-filters select {
  padding: 0.5rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  background: #fff;
  min-width: 180px;
}

.admin-filters input[type="text"]:focus,
.admin-filters select:focus {
  outline: none;
  border-color: #8b6f4e;
}

.search-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-wrapper input {
  padding-right: 2rem;
}
.search-clear {
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.3rem;
  line-height: 1;
}
.search-clear:hover {
  color: #333;
}

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.admin-table th {
  text-align: left;
  padding: 0.8rem 1rem;
  background: #f5f3f0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  font-weight: 600;
}

.admin-table td {
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  border-top: 1px solid #f0eeeb;
  vertical-align: middle;
}

.admin-table td.actions {
  display: flex;
  gap: 0.4rem;
}

.admin-table .thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.admin-table .thumb:hover {
  opacity: 0.8;
}

.cat-tag {
  display: inline-block;
  background: #f0eeeb;
  color: #555;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin: 0.1rem 0.2rem;
  white-space: nowrap;
}

.admin-table tr.dragging {
  opacity: 0.4;
}

.admin-table tr.drag-over td {
  box-shadow: inset 0 2px 0 0 #8b6f4e;
}

.admin-table .drag-handle {
  cursor: grab;
  color: #ccc;
  font-size: 1rem;
  user-select: none;
}

.admin-table .drag-handle:active {
  cursor: grabbing;
}

.inline-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
}

/* Admin Form */
.admin-form {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  max-width: 900px;
}

.admin-form .form-group { margin-bottom: 1rem; }

.admin-form label { font-weight: 600; color: #444; }

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="url"],
.admin-form input[type="file"],
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  outline: none;
  border-color: #8b6f4e;
}

.admin-form textarea { min-height: 140px; }

.image-preview {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.image-preview img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  cursor: pointer;
  font-size: 0.88rem;
  padding: 0.15rem 0;
}

.checkbox-group label input[type="checkbox"] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.waiting-inline {
  font-weight: 400;
  color: #666;
  font-size: 0.82rem;
  white-space: nowrap;
}
#pWaitingTime {
  width: 44px !important;
  max-width: 44px !important;
  min-width: 0 !important;
  padding: 0.15rem 0.3rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.82rem;
  text-align: center;
  margin: 0 0.2rem;
  box-sizing: border-box;
  flex: none !important;
  -moz-appearance: textfield;
}
#pWaitingTime::-webkit-outer-spin-button,
#pWaitingTime::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cat-parent-label {
  font-weight: 600;
}

.cat-child-label {
  padding-left: 1.5rem;
}

.form-buttons {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0eeeb;
}

.login-box {
  background: #fff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 380px;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.login-box .form-group { margin-bottom: 1rem; }

.login-box input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
}

.login-box input:focus {
  outline: none;
  border-color: #8b6f4e;
}

.login-box .btn {
  width: 100%;
  padding: 0.8rem;
  margin-top: 0.5rem;
}

/* Requests */
.requests-grid {
  display: grid;
  gap: 1rem;
}

.request-card {
  background: #fff;
  padding: 1.2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-size: 0.9rem;
}

.request-card .request-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: #888;
  font-size: 0.8rem;
}

.request-card strong { color: #333; }

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Footer */
.site-footer {
  background: #1e1e1e;
  color: #bbb;
  padding: 0;
  margin-top: 4rem;
  position: relative;
}

.site-footer::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #8b6f4e, #c4a77d, #8b6f4e);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding: 3rem 2rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 0.8rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: #8b6f4e;
  border-radius: 2px;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: #999;
  margin-bottom: 0.3rem;
}

.footer-col a {
  color: #bbb;
  font-size: 0.9rem;
  transition: color 0.2s, padding-left 0.2s;
  display: inline-block;
  line-height: 2;
}

.footer-col a:hover {
  color: #c4a77d;
  padding-left: 4px;
}

.footer-col .footer-links {
  display: flex;
  flex-direction: column;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 1.2rem 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: #666;
}

.footer-bottom a {
  color: #888;
  font-size: 0.8rem;
  margin: 0 0.5rem;
  transition: color 0.2s;
}

.footer-bottom a:hover { color: #c4a77d; }

.footer-sep {
  display: none;
}

.footer-links a.nav-admin-link { opacity: 0.5; font-size: 0.8rem; }
.footer-links a.nav-admin-link:hover { opacity: 1; color: #c4a77d; }

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }

  .footer-col h4 {
    text-align: center;
  }

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-col,
  .footer-col p,
  .footer-col .footer-links {
    text-align: center;
  }

  .footer-bottom {
    padding: 1rem 1.5rem;
  }
}

/* Legal modals */
#impressumModal p,
#datenschutzModal p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
  color: #444;
}

#impressumModal h2,
#datenschutzModal h2 {
  margin-bottom: 1rem;
}

/* Custom page content */
.page-content {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  max-width: 800px;
  margin: 0 auto;
}

.page-content h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #2c2c2c;
}

.page-content h2 {
  font-size: 1.5rem;
  margin: 1.5rem 0 0.8rem;
  color: #2c2c2c;
}

.page-content h3 {
  font-size: 1.2rem;
  margin: 1.2rem 0 0.6rem;
  color: #444;
}

.page-content p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 0.8rem;
}

.page-content strong {
  color: #2c2c2c;
}

.page-content ul,
.page-content ol {
  margin: 0.5rem 0 1rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #555;
}

.page-content a:not(.btn) {
  color: #8b6f4e;
  text-decoration: underline;
}

.page-content a:not(.btn):hover {
  color: #735a3d;
}

.page-content a.btn:hover {
  opacity: 0.9;
}

.page-content table td {
  border-bottom: 1px solid #f0eeeb;
}

.page-content hr {
  border: none;
  border-top: 1px solid #e8e4df;
  margin: 1.5rem 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #999;
}

.empty-state p { font-size: 1.1rem; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 2rem 0 1rem;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

.page-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.page-info {
  font-size: 0.9rem;
  color: #666;
  white-space: nowrap;
}

/* Admin inline status editor */
.admin-status-editor {
  margin-top: 0.8rem;
}

.admin-status-editor .admin-status-badge {
  display: inline-block;
  margin-bottom: 0.3rem;
}

.admin-status-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  color: #555;
  background: #f9f7f4;
  border: 1px solid #e8e4df;
  border-radius: 8px;
}

.admin-status-form select {
  padding: 0.25rem 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.85rem;
  background: #fff;
}

.admin-status-form input {
  padding: 0.25rem 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: center;
}

.admin-status-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.admin-edit-link {
  margin-left: auto;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.4rem;
  aspect-ratio: 1;
}

.admin-price-input {
  width: 3.5rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: right;
  -moz-appearance: textfield;
}
.admin-price-input::-webkit-outer-spin-button,
.admin-price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.admin-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.admin-preview-overlay.hidden {
  display: none;
}
.admin-preview-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.admin-preview-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
}
.admin-preview-close:hover {
  color: #ccc;
}
