/* ============================================
   DANA EARTH - Public Styles (Pastel, Earthy, Creamy)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --primary: #8B7355;
  --primary-dark: #6B5A45;
  --accent: #C4A882;
  --bg: #FDF8F3;
  --card-bg: #FFFFFF;
  --text: #4A3F35;
  --text-light: #8C7E6F;
  --border: #E8DFD5;
  --success: #7B9E6B;
  --warning: #D4A76A;
  --danger: #C97B7B;
  --shadow: 0 2px 8px rgba(139, 115, 85, 0.08);
  --shadow-lg: 0 8px 24px rgba(139, 115, 85, 0.12);
  --radius: 12px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

/* HEADER */
header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

header.has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

header .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0.6;
  z-index: 1;
}

header .container {
  position: relative;
  z-index: 2;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.header-left {
  text-align: center;
}

.header-logo {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

header h1 i { margin-right: 12px; opacity: 0.9; }

.subtitle {
  opacity: 0.9;
  font-size: 1.05rem;
  font-weight: 300;
  font-style: italic;
  font-family: var(--font-heading);
}

/* CART BUTTON */
.cart-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  background: rgba(139,115,85,0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 50;
}

.cart-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* STATS BAR */
.stats-bar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
}

.stat-item.available .stat-number { color: var(--success); }
.stat-item.rented .stat-number { color: var(--warning); }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* FILTERS */
.filters {
  padding: 20px 0;
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.search-box input {
  width: 100%;
  padding: 12px 12px 12px 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: all 0.2s;
  font-family: var(--font-body);
  background: var(--bg);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,115,85,0.1);
}

select {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--bg);
  cursor: pointer;
  font-family: var(--font-body);
  min-width: 160px;
  color: var(--text);
}

select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,115,85,0.1);
}

/* CATALOG GRID */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  padding: 32px 0;
}

/* CARD */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: var(--bg);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}

.badge-available {
  background: rgba(123, 158, 107, 0.9);
  color: white;
}

.badge-rented {
  background: rgba(212, 167, 106, 0.9);
  color: white;
}

.badge-non-available {
  background: rgba(201, 123, 123, 0.9);
  color: white;
}

.card-body {
  padding: 18px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.card-meta {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.card-meta span {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-meta span i {
  font-size: 0.7rem;
  color: var(--accent);
}

.card-price {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.card-price::before {
  content: 'Rp ';
  font-weight: 400;
  font-size: 0.85rem;
}

.card-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 12px;
  font-family: var(--font-body);
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}

.card-add-btn:hover {
  background: var(--primary-dark);
}

.card-add-btn:disabled {
  background: var(--border);
  color: var(--text-light);
  cursor: not-allowed;
}

/* LOADING & EMPTY */
.loading, .empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.loading i, .empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  opacity: 0.5;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 63, 53, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal {
  background: white;
  border-radius: var(--radius);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 10;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg);
}

.modal-content {
  display: flex;
  flex-direction: column;
}

.modal-image {
  position: relative;
  height: 380px;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.modal-info {
  padding: 28px;
}

.modal-info h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.modal-kategori {
  color: var(--text-light);
  margin-bottom: 18px;
  font-size: 0.95rem;
}

.modal-details {
  display: flex;
  gap: 28px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.95rem;
}

.detail-item i {
  color: var(--accent);
  width: 16px;
  text-align: center;
}

.modal-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.7;
}

.modal-status {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}

.btn-add-cart:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-add-cart:disabled {
  background: var(--border);
  color: var(--text-light);
  cursor: not-allowed;
  transform: none;
}

/* CART SIDEBAR */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 63, 53, 0.5);
  z-index: 150;
  backdrop-filter: blur(2px);
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 92vw;
  height: 100vh;
  background: white;
  z-index: 160;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
}

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

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.cart-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-header h3 i {
  color: var(--primary);
}

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

.cart-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
}

.cart-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  opacity: 0.4;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  background: var(--bg);
}

.cart-item-img {
  width: 72px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-detail {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

.cart-item-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  align-self: flex-start;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.cart-item-remove:hover { opacity: 1; }

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 18px;
  padding: 0 4px;
}

.btn-whatsapp {
  width: 100%;
  padding: 16px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.btn-whatsapp:hover {
  background: #128C7E;
  transform: translateY(-2px);
}

.btn-clear-cart {
  width: 100%;
  padding: 12px;
  background: none;
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-body);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-clear-cart:hover {
  background: var(--bg);
  border-color: var(--danger);
  color: var(--danger);
}

/* FOOTER */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 28px 0;
  font-size: 0.85rem;
  margin-top: 48px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header h1 { font-size: 1.6rem; }
  .stats-grid { gap: 24px; }
  .stat-number { font-size: 1.5rem; }
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  .card-image { height: 220px; }
  .filter-row { flex-direction: column; }
  .search-box, select { width: 100%; min-width: unset; }
  .modal-image { height: 260px; }
  .modal-details { gap: 14px; }
  .cart-sidebar { width: 100%; max-width: 100vw; }
}

@media (max-width: 480px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-body { padding: 14px; }
  .card-title { font-size: 0.9rem; }
  .card-price { font-size: 1rem; }
  .card-add-btn { padding: 8px 12px; font-size: 0.75rem; }
}