/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #faf8f3;
  color: #1a1a1a;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── UA Colors ── */
/* Black: #1a1a1a / #222   Gold: #c5a000 / #d4af37 / #f5e6a3 */

/* ── Header ── */
header {
  background: linear-gradient(135deg, #111 0%, #1a1a1a 50%, #222 100%);
  color: white;
  padding: 1.5rem 1rem 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.header-content h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #d4af37;
}
.subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-top: 0.15rem;
  color: #f5e6a3;
}
.deadline-banner {
  display: inline-block;
  background: rgba(212,175,55,0.2);
  border: 1px solid rgba(212,175,55,0.3);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  color: #f5e6a3;
}
.cart-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(212,175,55,0.2);
  border: 1px solid rgba(212,175,55,0.4);
  color: #d4af37;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
}
.cart-toggle:hover { background: rgba(212,175,55,0.35); }
.cart-badge {
  background: #d4af37;
  color: #111;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-left: 0.3rem;
  font-weight: 700;
}

/* ── Photo Link ── */
.photo-link {
  text-align: center;
  padding: 0.75rem;
  background: #f5e6a3;
  border-bottom: 1px solid #d4c47a;
}
.photo-link a {
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}
.photo-link a:hover { text-decoration: underline; }

/* ── Catalog ── */
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}
.category {
  background: white;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #e8e2d0;
}
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border-bottom: 2px solid #d4af37;
}
.category-header h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #f5e6a3;
}
.category-header.new-badge {
  background: linear-gradient(135deg, #d4af37, #c5a000);
  border-bottom-color: #b8960a;
}
.category-header.new-badge h2 { color: #111; }
.category-price {
  font-weight: 700;
  font-size: 1rem;
  color: #d4af37;
  white-space: nowrap;
}
.category-header.new-badge .category-price { color: #1a1a1a; }
.category-desc {
  padding: 0.5rem 1rem 0;
  font-size: 0.8rem;
  color: #666;
}
.items-grid {
  padding: 0.5rem;
}

/* ── Item Cards ── */
.item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #f0ede3;
  gap: 0.5rem;
  text-align: center;
}
.item-card:last-child { border-bottom: none; }
.item-thumb {
  width: 100%;
  max-width: 280px;
  height: 200px;
  border-radius: 10px;
  object-fit: cover;
  background: #f0f0f0;
  cursor: pointer;
  transition: transform 0.2s;
}
.item-thumb:hover { transform: scale(1.02); }
.item-thumb-placeholder {
  width: 100%;
  max-width: 280px;
  height: 200px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5e6a3 0%, #e8ddb0 100%);
}
.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  z-index: 500;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}
.item-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.item-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}
.item-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #666;
  margin-top: 0.2rem;
}
.sun-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
}
.sun-badge.sun { background: #fff9c4; color: #f57f17; }
.sun-badge.part-sun { background: #fff3e0; color: #ef6c00; }
.sun-badge.shade-sun { background: #e8f5e9; color: #2e7d32; }
.sun-badge.shade { background: #e3f2fd; color: #1565c0; }

.item-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.qty-control {
  display: flex;
  align-items: center;
  background: #f5f3ed;
  border-radius: 6px;
  overflow: hidden;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: #e8e2d0; }
.qty-input {
  width: 32px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.add-btn {
  background: #1a1a1a;
  color: #d4af37;
  border: none;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.add-btn:hover { background: #333; }
.add-btn.added { background: #d4af37; color: #111; }

/* ── Cart Panel ── */
#cart {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  overflow-y: auto;
}
#cart.cart-open { right: 0; }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid #d4af37;
  background: #1a1a1a;
  color: #f5e6a3;
}
.cart-header h2 { font-size: 1.1rem; color: #d4af37; }
.cart-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #999;
  padding: 0.25rem;
}
.cart-close:hover { color: #d4af37; }

#cart-items {
  flex: 1;
  padding: 0.75rem 1rem;
  overflow-y: auto;
}
.empty-cart {
  text-align: center;
  color: #999;
  padding: 2rem 0;
  font-size: 0.9rem;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0ede3;
  gap: 0.5rem;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-info strong {
  display: block;
  font-size: 0.85rem;
}
.cart-item-cat {
  font-size: 0.72rem;
  color: #888;
}
.cart-item-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-size: 0.82rem;
}
.cart-item-qty { color: #666; }
.cart-item-total { font-weight: 600; }
.remove-btn {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.15rem;
}
.remove-btn:hover { color: #b71c1c; }

/* ── Cart Footer / Form ── */
.cart-footer {
  border-top: 2px solid #e8e2d0;
  padding: 1rem 1.25rem;
  background: #faf8f3;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1a1a1a;
}
.total-amount { font-size: 1.3rem; color: #c5a000; }

#order-form h3 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #333;
}
#order-form input,
#order-form textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d4c47a;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  font-family: inherit;
  background: white;
}
#order-form input:focus,
#order-form textarea:focus {
  outline: none;
  border-color: #c5a000;
  box-shadow: 0 0 0 2px rgba(197,160,0,0.2);
}

.payment-info {
  background: linear-gradient(135deg, #f5e6a3, #f0dfa0);
  border-radius: 8px;
  padding: 0.75rem;
  margin: 0.75rem 0;
  text-align: center;
}
.payment-info h3 {
  margin-bottom: 0.25rem;
  color: #1a1a1a;
}
.payment-info p {
  font-size: 0.88rem;
  margin: 0.15rem 0;
}

.submit-btn {
  width: 100%;
  padding: 0.8rem;
  background: #1a1a1a;
  color: #d4af37;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.submit-btn:hover:not(:disabled) { background: #333; }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Success Screen ── */
#order-success {
  max-width: 500px;
  margin: 2rem auto;
  padding: 1rem;
}
.success-card {
  background: white;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 2px solid #d4af37;
}
.success-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.success-card h2 {
  color: #1a1a1a;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.success-total {
  font-size: 1.2rem;
  margin: 0.75rem 0 0.25rem;
}
.success-id {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 1rem;
}
.payment-reminder {
  background: linear-gradient(135deg, #f5e6a3, #f0dfa0);
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
}
.payment-reminder h3 { color: #1a1a1a; margin-bottom: 0.25rem; }
.delivery-note {
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #555;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.5rem 1rem;
}
.contact-info {
  background: #1a1a1a;
  color: #f5e6a3;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 0 1rem 1rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.contact-info h3 {
  color: #d4af37;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.contact-info p {
  font-size: 0.9rem;
  margin: 0.2rem 0;
}
.contact-info a {
  color: #d4af37;
  text-decoration: none;
  font-weight: 600;
}
.contact-info a:hover { text-decoration: underline; }
.footer-tagline {
  color: #888;
  font-size: 0.78rem;
  margin-top: 0.5rem;
}

/* ── Desktop Layout ── */
@media (min-width: 768px) {
  header { padding: 2rem 1.5rem 1.25rem; }
  .header-content h1 { font-size: 2rem; }
  .subtitle { font-size: 1.15rem; }
  main { padding: 1.5rem; }

  .item-card {
    flex-direction: row;
    text-align: left;
    padding: 0.7rem 0.75rem;
    gap: 0.75rem;
  }
  .item-thumb, .item-thumb-placeholder {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
  }
  .item-bottom { width: auto; flex: 1; }
  .item-name { font-size: 0.95rem; }
}

/* ── Overlay when cart open (mobile) ── */
#cart.cart-open::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  z-index: -1;
}
