.produk-kategori {
  margin-left: 15px; 
  font-size: 1.1rem; 
  color: #2d3748;
}

:root {
  --primary: #dd6b20;
  --primary-dark: #c05621;
  --secondary: #d11d3b;
  --text: #2d3748;
  --text-light: #718096;
  --background: #f7fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Public Sans", "Montserrat", sans-serif;
  background: linear-gradient(135deg, #f7faff, #f7fbf9);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 70px;
}

/* Header & Toko Profil */
.store-header {
  background: white;
  color: black;
  padding: 20px 0;
  margin-bottom: 24px;
}

.store-profile {
  display: flex;
  align-items: center;
  padding: 0 16px;
  margin-bottom: 16px;
}

.store-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid white;
  flex-shrink: 0;
}

.store-info {
  margin-left: 10px;
  flex-grow: 1;
}

.store-name {
  gap: 2px;
  align-content: center;
  align-self: center;
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.store-name img {
  vertical-align: middle;
  margin: 0;
}

.store-rating {
  width: fit-content;
  font-size: 0.6rem;
  background-color: #fbfbfcff;
  border: 1px solid #eeeff0ff;
  border-radius: 20px;
  padding: 0px 5px;
  color: #ffd700;
  margin-bottom: 4px;
}

.store-description {
  background: linear-gradient(135deg, #dbeafe, #dcfce7);
  border-radius: 5px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.9;
  margin: 15px 0px;
  line-height: 1.5;
  padding: 16px;
}

/* Search Bar */
.search-container {
  padding: 0 16px;
  margin-bottom: 0px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 46px;
  border: 1px solid #dfdfdf;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.9);
  font-family: 'Public Sans', sans-serif;
  font-size: 0.8rem;
  box-shadow: 0 4px 5px rgba(136, 136, 136, 0.01);
  transition: all 0.3s ease;
}

.search-box input:focus {
  border: 1px solid #2b80ff;
  outline: none;
  box-shadow: 0 6px 5px rgba(100, 100, 100, 0.12);
  background-color: white;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #667eea;
  font-size: 1rem;
}

/* Footer */
footer {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

:root {
  --white-transparent: rgba(255, 255, 255, 0.75);
  --border-transparent: rgba(226, 232, 240, 0.6);
}

/* Cart Icon dengan Badge */
.cart-container {
  position: relative;
  display: inline-block;
}

#cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

#cart-icon:hover {

  transform: translateY(-1px);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff2b2b;
  color: var(--white);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--white);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Flash Message */
.flash-message {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: var(--white);
  padding: 16px;
  text-align: center;
  margin: 0 auto;
  max-width: 1100px;
  border-radius: 0 0 12px 12px;
  font-weight: 500;
  box-shadow: var(--shadow);
}

/* Products Grid */
.products {
  margin: 0 auto;
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  padding: 30px 100px 100px;
}

/* Product Card Modern */
.product {
    height: fit-content;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product:hover {
  transform: translateY(-1px);

  border-color: var(--primary);
}

.product-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #f7fafc, #edf2f7);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product:hover .product-image img {
  transform: scale(1.1);
}

/* Tombol Icon Keranjang di Pojok Kanan Bawah Gambar */
.cart-icon-button {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 10;
  transition: all 0.3s ease;

}


/* Style untuk tombol keranjang yang berhasil (hijau) */
.cart-icon-button.success {
  background: #25D366 !important;
  color: white !important;
  border-color: #25D366 !important;
  animation: pulseSuccess 0.5s ease;
}

.cart-icon-button.success:hover {
  background: #25D366 !important;
  color: white !important;
  transform: scale(1.1);
}

@keyframes pulseSuccess {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.product-content {
  height: auto;
  padding: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  padding: 0;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 5px;
      display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-variant-info {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.753);
  padding: 2px 4px;
  border-radius: 10px;
  font-size: 0.6rem;
  color: white;
  font-style: italic;
  z-index: 10;
}

.product-price {
  font-weight: 600;
  font-size: 1rem;
  color: #e6174a;
  margin-top: 0px;
  margin-bottom: 0px;
}

.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
  flex: 1;
}

.product-link:hover {
  color: inherit;
}

/* Modal Styles - Modern */
.variant-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.variant-modal-content {
  font-family: inherit;
  background: var(--white);
  max-width: 420px;
  width: 90%;
  margin: 100px auto;
  border-radius: 20px;
  animation: slideUp 0.4s ease;
  overflow: hidden;
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: rgb(48, 162, 255);
  color: var(--white);
  position: relative;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.variant-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #2b80ff;
  border-radius: 10px;
  font-size: 14px;
  background: var(--white);
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23718096' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.variant-select:focus {
  outline: none;
  border-color: #54acff;
  box-shadow: 0 0 0 3px rgba(32, 161, 221, 0.1);
}

.quantity-control {
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0px;
  max-width: 100px;
  box-sizing: border-box;
}

.quantity-btn {
  padding: 5px;
  border: none;
  width: 40px;
  height: 40px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.3s ease;
}

.quantity-btn:hover {
  color: #2b80ff;
  transform: scale(1.1);
}

.quantity-input {
  width: fit-content;
  text-align: center;
  padding: 2px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: var(--white);
}

.quantity-input:focus {
  outline: none;
  border-color: var(--primary);
}

.total-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
}

.total-label {
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
}

.total-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--secondary);
}

.modal-footer {
  font-size: 14px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 400;
  transition: all 0.3s ease;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--background);
  border-color: var(--text-light);
  transform: translateY(-2px);
}

.btn-primary {
  background: #c41e2c;
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background: var(--border);
  color: var(--text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .products {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 24px 16px 100px;
  }
}

@media (max-width: 768px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 20px 12px 100px;
  }

  .product {
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  }

  .product-image {
    height: 180px;
  }

  .product-content {
    padding: 10px;
  }

  .product-title {
    font-weight: 300;
    font-size: 0.8rem;
    line-height: normal;
    margin-bottom: 5px;
    color: #1e293b;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-price {
    font-weight: 500;
    font-size: 1rem;
  }

  .cart-icon-button {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    bottom: 8px;
    right: 8px;
  }

  header {
    padding: 12px 16px;
  }

  #cart-icon {
    width: 44px;
    height: 44px;
  }

  .cart-badge {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
}

/* No Products State */
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.no-products i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-products p {
  font-size: 18px;
  margin-bottom: 8px;
}

/* Cart Highlight Animation */
.cart-highlight {
  animation: cartPulse 0.6s ease;
}

@keyframes cartPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #25D366;
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  box-shadow: 0 0 0 rgba(37, 211, 102, 0.7);
  animation: pulse 1.8s infinite;
}

.wa-btn i {
  font-size: 18px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}