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

body {
  font-family: 'Inter', sans-serif;
  background: #f1f3f5;
  color: #1a1a1a;
}

.site-header {
  background: #e9ecef;
  padding: 30px 0 0;
  border-bottom: 1px solid #ced4da;
}

.logo-wrap {
  text-align: center;
  padding: 10px 20px;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 10vw, 120px);
  font-weight: 600;
  letter-spacing: 4px;
  color: #1a1a1a;
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 40px;
  position: relative;
  flex-wrap: wrap;
  gap: 20px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav a {
  text-decoration: none;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover { color: #4a6b8a; }

.nav-icons {
  position: absolute;
  right: 40px;
  display: flex;
  gap: 20px;
  font-size: 18px;
  cursor: pointer;
}

.hero {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(180deg, #e9ecef, #f1f3f5);
}

.hero h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px;
  font-weight: 600;
  margin-bottom: 15px;
}

.hero p { font-size: 18px; color: #666; }

.results-bar {
  max-width: 1400px;
  margin: 40px auto 20px;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.results-count {
  font-size: 14px;
  color: #1a1a1a;
  font-weight: 500;
}

.results-actions {
  display: flex;
  gap: 12px;
}

.results-btn {
  background: #fff;
  border: 1px solid #ced4da;
  padding: 10px 20px;
  font-size: 13px;
  border-radius: 24px;
  cursor: pointer;
  font-family: inherit;
  color: #1a1a1a;
  transition: background 0.2s;
}

.results-btn:hover { background: #f1f3f5; }
.results-btn.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

.dropdown-wrap { position: relative; }

.dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 18px;
  min-width: 260px;
  z-index: 100;
}

.dropdown.open { display: block; }

.dropdown h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 8px 0 6px;
  color: #666;
}
.dropdown h5:first-child { margin-top: 0; }

.dropdown select, .dropdown input[type="number"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
}

.range-row {
  display: flex;
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
  font-size: 13px;
  cursor: pointer;
}

.dropdown-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.dropdown-actions button {
  flex: 1;
  padding: 9px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.5px;
}

.dropdown-actions .btn-secondary {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #ced4da;
}

.dropdown-actions button:hover { background: #4a6b8a; color: #fff; }

.sort-opt {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: #1a1a1a;
  border-radius: 4px;
}

.sort-opt:hover { background: #f1f3f5; }
.sort-opt.active { background: #1a1a1a; color: #fff; font-weight: 500; }

.products {
  max-width: 1400px;
  margin: 0 auto 60px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 4px;
  background: #dee2e6;
  border-top: 1px solid #dee2e6;
  border-left: 1px solid #dee2e6;
}

.product-card {
  background: #fff;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  padding: 0 0 20px;
  transition: background 0.2s;
}

.product-card:hover { background: #f8f9fa; }
.product-card .product-info { padding: 14px 16px 0; }

.fav-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 20px;
  color: #1a1a1a;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 2;
  transition: transform 0.2s;
}

.fav-icon:hover { transform: scale(1.15); }
.fav-icon.active { color: #c00; }

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f5f5f5;
  display: block;
}

.product-info {
  padding: 20px 0 0;
  text-align: left;
}

.badge-new {
  font-size: 11px;
  color: #6b8e23;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}

.product-info h4 {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #1a1a1a;
  line-height: 1.4;
}

.product-desc {
  font-size: 12px;
  color: #888;
  margin-bottom: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-info .price {
  font-size: 16px;
  color: #1a1a1a;
  font-weight: 600;
  margin-bottom: 14px;
}

.add-btn {
  background: #1a1a1a;
  color: #fff;
  border: none;
  padding: 10px 22px;
  font-size: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 2px;
}

.add-btn:hover { background: #4a6b8a; }

.cart-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  box-shadow: -5px 0 20px rgba(0,0,0,0.1);
  transition: right 0.3s;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.cart-panel.open { right: 0; }

.cart-header {
  padding: 25px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
}

.cart-header button {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
}

.cart-item-info { flex: 1; }
.cart-item-info h5 { font-size: 14px; margin-bottom: 4px; }
.cart-item-info span { font-size: 13px; color: #4a6b8a; }

.cart-item button {
  background: none;
  border: none;
  color: #c00;
  cursor: pointer;
  font-size: 18px;
}

.cart-footer {
  padding: 25px;
  border-top: 1px solid #eee;
}

.cart-total {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
}

.checkout-btn {
  width: 100%;
  background: #1a1a1a;
  color: #fff;
  border: none;
  padding: 15px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.checkout-btn:hover { background: #4a6b8a; }

.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
}

.overlay.active { display: block; }

footer {
  text-align: center;
  padding: 40px;
  background: #e9ecef;
  color: #666;
  font-size: 14px;
  margin-top: 60px;
}

.category-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  flex-wrap: wrap;
  border-top: 1px solid #dee2e6;
  background: #f1f3f5;
}

.cat-chip {
  background: #fff;
  border: 1px solid #ced4da;
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 20px;
  cursor: pointer;
  color: #1a1a1a;
  transition: all 0.2s;
}

.cat-chip:hover { background: #e9ecef; }
.cat-chip.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

.admin-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 430px;
  max-width: 95vw;
  height: 100vh;
  background: #fff;
  box-shadow: -5px 0 20px rgba(0,0,0,0.15);
  transition: right 0.3s;
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.admin-panel.open { right: 0; }

.admin-header {
  padding: 22px 25px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1a1a;
  color: #fff;
}

.admin-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
}

.admin-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.admin-login {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-login p { color: #555; font-size: 14px; }
.admin-login small { color: #999; font-size: 12px; }
.admin-login code { background: #f1f3f5; padding: 2px 6px; border-radius: 3px; }

.admin-panel input, .admin-panel select {
  padding: 11px 14px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}

.admin-panel input:focus, .admin-panel select:focus {
  outline: none;
  border-color: #4a6b8a;
}

.admin-panel button {
  padding: 11px 16px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.5px;
  font-family: inherit;
}

.admin-panel button:hover { background: #4a6b8a; }

.admin-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 25px;
}

.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.tab-btn {
  background: none !important;
  color: #666 !important;
  border-radius: 0 !important;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -2px;
  flex: 1;
  padding: 12px !important;
}

.tab-btn.active {
  color: #1a1a1a !important;
  border-bottom-color: #1a1a1a !important;
  font-weight: 600;
}

.tab-content h4 {
  font-size: 14px;
  margin: 18px 0 10px;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-content > input, .tab-content > select, .tab-content > button {
  margin-bottom: 10px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.admin-list-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.admin-list-item .row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.admin-list-item .row:last-child { margin-bottom: 0; }

.admin-list-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  background: #eee;
}

.admin-list-item input, .admin-list-item select {
  font-size: 12px !important;
  padding: 6px 8px !important;
}

.admin-list-item .name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}

.mini-btn {
  padding: 6px 10px !important;
  font-size: 11px !important;
  background: #4a6b8a !important;
}

.mini-btn.danger { background: #c0392b !important; }

.logout-btn {
  margin-top: 25px;
  width: 100%;
  background: #c0392b !important;
}

@media (max-width: 600px) {
  .nav-icons { position: static; }
  .main-nav ul { gap: 20px; }
}

.product-image { cursor: zoom-in; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lb-image {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  user-select: none;
}
.lb-close, .lb-nav {
  position: absolute;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 30px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 20px; right: 20px; font-size: 22px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0,0,0,.5);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
}
@media (max-width: 600px) {
  .lb-close, .lb-nav { width: 44px; height: 44px; font-size: 26px; }
}

.img-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.img-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border: 2px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.img-thumb.main { border-color: #b8860b; box-shadow: 0 0 0 2px rgba(184,134,11,.25); }
.img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  display: block;
}
.img-thumb .thumb-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(192,57,43,.9);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-thumb .thumb-badge {
  position: absolute;
  left: 2px;
  bottom: 2px;
  background: #b8860b;
  color: #fff;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: .5px;
}

.file-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0;
}
.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f4efe6;
  color: #1a1a1a;
  border: 1px solid #d9d0bd;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
  user-select: none;
}
.file-btn:hover { background: #ece3cf; }
.file-btn:active { background: #e0d5ba; }

.carousel {
  position: relative;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .product-image {
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transition: background .2s, transform .2s;
}
.dot.active {
  background: #fff;
  transform: scale(1.3);
  box-shadow: 0 0 3px rgba(0,0,0,.4);
}
