:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --accent: #10b981;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar */
.top-bar {
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.85rem;
  padding: 8px 0;
}
.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-whatsapp {
  color: #4ade80;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.top-whatsapp:hover {
  text-decoration: underline;
}

/* Header */
.header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo i {
  color: var(--primary);
  font-size: 1.5rem;
}

.search-box {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: #f1f5f9;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}
.search-box input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.cart-btn:hover {
  background: var(--primary-hover);
}
.cart-btn:active {
  transform: scale(0.97);
}
.cart-badge {
  background: #ef4444;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 50px 0;
  margin-bottom: 30px;
}
.hero-container {
  text-align: center;
}
.hero-tag {
  display: inline-block;
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.hero-section h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.hero-section p {
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 24px;
  font-size: 1.05rem;
}
.hero-features {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}
.feat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #cbd5e1;
}
.feat-item i {
  color: #38bdf8;
}

/* Categories Bar */
.categories-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0 20px;
  scrollbar-width: none;
}
.categories-bar::-webkit-scrollbar {
  display: none;
}
.cat-pill {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Products Grid */
.catalog-section {
  padding-bottom: 60px;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 85%;
  background: #f1f5f9;
  overflow: hidden;
}
.card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-card:hover .card-img-wrap img {
  transform: scale(1.05);
}
.img-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #cbd5e1;
}

.badge-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.badge-featured {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f59e0b;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.3;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-logistics-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.origin-tag, .dispatch-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
.origin-tag {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.dispatch-tag {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.card-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.main-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}
.old-price {
  font-size: 0.95rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.stock-info {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.add-to-cart-btn {
  background: #0f172a;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.add-to-cart-btn:hover {
  background: var(--primary);
}

/* Cart Drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: white;
  z-index: 210;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer.open {
  right: 0;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.close-cart-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
}

.cart-logistics-alert {
  padding: 12px 18px 0;
}
.logistics-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.4;
}
.logistics-box i {
  font-size: 1.1rem;
  margin-top: 2px;
}
.logistics-box.unified {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.logistics-box.unified i {
  color: #15803d;
}
.logistics-box.multi {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.logistics-box.multi i {
  color: #d97706;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 50px 0;
}
.cart-empty i {
  font-size: 3rem;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}
.cart-item-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #f1f5f9;
}
.cart-item-info {
  flex: 1;
}
.cart-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}
.cart-item-price {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}
.cart-item-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.total-line {
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.checkout-btn {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}
.checkout-btn:hover:not(:disabled) {
  background: #059669;
}
.checkout-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
}
.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 24px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}
.close-modal-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
}

.form-section {
  margin-bottom: 20px;
}
.form-section h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-group {
  margin-bottom: 12px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pay-option input {
  display: none;
}
.pay-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.pay-card i {
  font-size: 1.4rem;
  color: var(--primary);
}
.pay-card strong {
  display: block;
  font-size: 0.95rem;
}
.pay-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.pay-option input:checked + .pay-card {
  border-color: var(--primary);
  background: #f0f9ff;
  box-shadow: 0 0 0 2px var(--primary);
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.total-badge {
  font-size: 1.1rem;
}
.total-badge strong {
  color: var(--text-main);
  font-size: 1.3rem;
}
.confirm-order-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.confirm-order-btn:hover {
  background: #059669;
}

/* Success Modal */
.success-content {
  text-align: center;
  padding: 36px 24px;
}
.success-icon i {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 16px;
}
.order-code-box {
  background: #f1f5f9;
  border: 1px dashed var(--border);
  padding: 12px;
  border-radius: var(--radius-md);
  margin: 16px 0 24px;
  font-size: 1.1rem;
}
.success-actions {
  margin-bottom: 16px;
}
.btn-primary-link {
  display: inline-block;
  background: #009ee3;
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
}
.btn-whatsapp-link {
  display: inline-block;
  background: #25d366;
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
}
.btn-secondary {
  background: none;
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
}

/* Footer */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 0 20px;
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-col h3, .footer-col h4 {
  color: white;
  margin-bottom: 12px;
}
.admin-link {
  color: #38bdf8;
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0;
  }
  .search-box {
    order: 3;
    max-width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr;
  }
}
