/* === VARIABLES === */
:root {
  --primary: #db7093;
  --primary-dark: #c06080;
  --primary-darker: #a05070;
  --accent: #c71585;
  --accent-light: #e83e8c;
  --light-bg: #fff0f5;
  --light-bg-secondary: #ffe4ec;
  --text-dark: #333;
  --text-light: #555;
  --text-on-primary: white;
  --border-color: #ddd;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.2);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

/* === BASE STYLES === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-bg);
  color: var(--text-dark);
  line-height: 1.6;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* === LAYOUT === */
.wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  padding: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* === HEADER === */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: white;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.logo img {
  height: 40px;
}

.search-bar input {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  width: 10rem;
  transition: var(--transition);
}

.search-bar input:focus {
  width: 13.75rem;
  outline: 2px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(219, 112, 147, 0.3);
}

/* === BANNER === */
.hero-banner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* === KATEGORI FILTER === */
.kategori-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 1.5rem auto;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.kategori-filter button {
  background-color: var(--primary);
  color: var(--text-on-primary);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 1.25rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.kategori-filter button:hover, 
.kategori-filter button:focus {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kategori-filter button.active {
  background-color: var(--primary-darker);
}

/* === PRODUCT LIST === */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.product {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.product img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product:hover img {
  transform: scale(1.03);
}

.product-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-info h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.product-info p {
  margin: 0 0 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
  flex-grow: 1;
}

.price {
  font-weight: bold;
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.harga-asli {
  text-decoration: line-through;
  color: var(--text-light);
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.harga-diskon {
  color: var(--accent);
  font-weight: bold;
}

.pesan-wrapper {
  margin-top: auto;
  padding: 1rem;
  padding-top: 0;
}

.pesan-wrapper a {
  text-decoration: none;
  display: block;
}

/* === BUTTON === */
.ripple-btn {
  position: relative;
  overflow: hidden;
  background-color: var(--primary);
  color: var(--text-on-primary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  width: 100%;
  font-weight: 600;
  text-align: center;
}

.ripple-btn:hover,
.ripple-btn:focus-visible {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ripple-btn:active {
  transform: translateY(0);
}

.ripple-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.icon {
  transition: transform 0.3s ease;
}

.ripple-btn:hover .icon,
.ripple-btn:focus-visible .icon {
  transform: rotate(-10deg) scale(1.2);
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 1.5rem;
  background-color: white;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.9rem;
}

/* === FORM PAGE === */
.form-header {
  background: linear-gradient(135deg, var(--light-bg-secondary) 0%, #ffcce0 100%);
  padding: 2.5rem 1.5rem;
  text-align: center;
  position: relative;
  margin-bottom: 2rem;
}

.form-header-text {
  max-width: 600px;
  margin: 0 auto;
}

.form-header h1 {
  margin: 0;
  font-size: 2rem;
}

.form-header p {
  margin: 0.5rem 0 0;
  color: var(--text-light);
  font-size: 1.1rem;
}

.btn-kembali {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-kembali:hover {
  background: var(--primary-dark);
  transform: translateX(-3px);
}

.btn-kembali:active {
  transform: translateX(0);
}

form {
  background-color: white;
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: 600px;
  margin: 0 auto 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
  color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(219, 112, 147, 0.3);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.hint {
  color: var(--text-light);
  font-size: 0.8rem;
  display: block;
  margin-top: 0.3rem;
}

.note-pemesanan {
  background-color: #fff7fa;
  border-left: 4px solid var(--primary);
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.note-pemesanan p {
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-weight: bold;
}

.note-pemesanan ul {
  list-style: disc;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-light);
}

.note-pemesanan li {
  margin-bottom: 0.5rem;
}


/* Loading state */
.loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.carousel-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.carousel-img.active {
  opacity: 1;
  z-index: 1;
}

.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dots span.active {
  background: var(--accent);
}





@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .kategori-filter {
    display: none;
  }

  .main-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .search-bar input {
    width: 100%;
    max-width: 100%;
  }

  .search-bar input:focus {
    width: 100%;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-row .form-group {
    margin-bottom: 1.5rem;
  }

  .form-header {
    padding: 2rem 1rem;
  }

  .form-header h1 {
    font-size: 1.5rem;
  }

  form {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .product-list {
    grid-template-columns: 1fr;
  }

  .btn-kembali {
    top: 1rem;
    left: 1rem;
    width: 35px;
    height: 35px;
  }

  
}