* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #0f172a;
  color: #111827;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.top-bar.admin-bar {
  background: linear-gradient(135deg, #1d4ed8, #111827);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand h1 {
  font-size: 1.4rem;
}

.brand p {
  font-size: 0.85rem;
  opacity: 0.8;
}

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

.main-nav a {
  color: #e5e7eb;
  font-size: 0.9rem;
  text-decoration: none;
}

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

.cart-summary {
  font-weight: 500;
}

.hero {
  position: relative;
  height: 360px;
  background-image: url('https://images.pexels.com/photos/7671166/pexels-photo-7671166.jpeg?auto=compress&cs=tinysrgb&w=1200');
  background-size: cover;
  background-position: center center;
  border-radius: 0 0 1.5rem 1.5rem;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.3));
}

.hero.hero-has-banner .hero-overlay {
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f9fafb;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.hero p {
  font-size: 0.95rem;
  max-width: 320px;
  margin-bottom: 0.75rem;
  color: #e5e7eb;
}

.hero-btn {
  margin-top: 0.25rem;
}

.hero-badge {
  background: rgba(15, 23, 42, 0.9);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.5);
}

.hero-badge span {
  display: block;
}

.container {
  max-width: 1100px;
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 2fr 1.4fr;
  gap: 1.5rem;
}

.admin-container {
  display: block;
}

.products-section, .cart-section, .admin-section {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: 1.2rem;
}

.section-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
}

.product-modal.hidden {
  display: none;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
}

.product-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 1rem;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.4);
  overflow: auto;
}

.product-modal-close {
  position: absolute;
  right: 1rem;
  top: 0.7rem;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.product-modal-body {
  display: grid;
  grid-template-columns: 1.3fr 1.7fr;
  gap: 1.25rem;
}

.product-modal-image-wrap img {
  width: 100%;
  border-radius: 0.75rem;
  object-fit: cover;
}

.product-modal-info h2 {
  margin-bottom: 0.4rem;
}

.product-modal-price-row {
  margin-bottom: 0.75rem;
}

.product-modal-size-row,
.product-modal-qty-row {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.product-modal-sizes {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.product-card-sizes {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.product-modal-size-btn {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  background: #f9fafb;
  cursor: pointer;
}

.product-modal-size-btn.selected {
  background: #111827;
  color: #f9fafb;
  border-color: transparent;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.product-modal-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.product-modal-description {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #4b5563;
}

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

.products-section h2, .cart-section h2, .admin-section h2 {
  margin-bottom: 0.75rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.product-card {
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-card img {
  width: 100%;
  border-radius: 0.5rem;
  height: 150px;
  object-fit: cover;
}

.product-title {
  font-weight: 600;
}

.product-price {
  font-weight: 600;
  color: #16a34a;
}

.product-old-price {
  text-decoration: line-through;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-left: 0.25rem;
}

.product-discount {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  display: inline-block;
}

.product-description {
  font-size: 0.85rem;
  color: #4b5563;
  min-height: 2.3em;
}

.product-actions {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

select, input, textarea {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

select:focus, input:focus, textarea:focus {
  outline: 2px solid #2563eb;
  border-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 999px;
  color: #ffffff;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-secondary {
  background: #e5e7eb;
  border-radius: 999px;
  border: none;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
}

.cart-section h2 {
  margin-bottom: 0.5rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.cart-item-info {
  max-width: 70%;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cart-settings {
  margin: 0.75rem 0;
}

.totals {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.grand-total {
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.order-message {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.admin-list {
  max-height: 420px;
  overflow-y: auto;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.5rem;
}

.admin-product-item, .admin-order-item {
  border-bottom: 1px dashed #e5e7eb;
  padding: 0.45rem 0;
  font-size: 0.85rem;
}

.admin-product-header, .admin-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.badge-active {
  background: #dcfce7;
  color: #166534;
}

.badge-inactive {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-area {
  background: #eef2ff;
  color: #3730a3;
}

.order-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

.order-items {
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }
}


