.modal-image-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  width: 100%;
  max-width: 400px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.modal-image-slider img {
  scroll-snap-align: center;
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.modal-image-slider::-webkit-scrollbar {
  height: 8px;
}

.modal-image-slider::-webkit-scrollbar-thumb {
  background: var(--primary, #35612D);
  border-radius: 4px;
}

:root {
  --primary: #35612D;
  /* Hijau ADDAMS */
  --primary-light: #487c3f;
  --bg-main: #f4f6f8;
  --card-bg: #ffffff;
  --text-dark: #1a1a1a;
  --text-muted: #666666;
  --border: #e0e0e0;
  --radius: 12px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
  background-color: rgb(255, 255, 255);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  height: 60px;
  border-radius: 8px;
  background: transparent;
}

.brand-title {
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 2rem;
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 14px;
}

.search-wrapper input {
  width: 100%;
  padding: 12px 20px 12px 42px;
  border: none;
  border-radius: 30px;
  font-size: 14px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  outline: none;
  transition: all 0.3s;
}

.search-wrapper input:focus {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.action-btn {
  background: white;
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.action-btn:hover {
  background: #f4f6f8;
}

.ruang-sarung-btn {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.ruang-sarung-btn:hover {
  background: #1f4a30;
  color: white;
  border-color: #1f4a30;
  transform: translateY(-1px);
}

.ig-btn {
  padding: 8px 14px;
}

.search-container {
  background: white;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
  display: flex;
  justify-content: center;
}

.search-container.active {
  max-height: 80px;
  padding: 0 1rem 1rem 1rem;
}

.search-container input {
  width: 100%;
  max-width: 600px;
  padding: 14px 24px;
  border: none;
  border-radius: 30px;
  font-size: 15px;
  padding: 10px 16px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  transition: background 0.3s;
}

.search-box-header input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.desktop-search {
  display: block;
}

.mobile-only {
  display: none !important;
}

/* Sidebar */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.hidden {
  display: none !important;
}

.sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: var(--card-bg);
  z-index: 1000;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  right: 0;
}

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

.sidebar-header h2 {
  font-size: 1.1rem;
  color: var(--primary);
}

.close-sidebar {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.sidebar-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.filter-group {
  margin-bottom: 25px;
}

.filter-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 5px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

.styled-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  color: var(--text-dark);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2335612D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.styled-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(53, 97, 45, 0.1);
}

.styled-select.w-100 {
  width: 100%;
}

.download-page-wrap {
  display: flex;
  justify-content: center;
  margin: 28px 0 0;
}

.download-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid rgba(53, 97, 45, 0.25);
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.download-page-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

.download-page-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 40px 0 20px 0;
  flex-wrap: wrap;
}

.page-btn {
  padding: 10px 20px;
  border: 1px solid var(--primary);
  background-color: white;
  color: var(--primary);
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background-color: var(--primary-light);
  color: white;
}

.page-btn:disabled {
  background-color: #f0f0f0;
  border-color: #ddd;
  color: #999;
  cursor: not-allowed;
}

.pagination-container span {
  font-size: 14px;
  color: #555;
  background: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #ddd;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .header-content {
    padding: 0 1rem;
    height: 60px;
  }
  
  .logo {
    height: 40px !important;
    width: auto;
  }

  .desktop-search {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .brand-title {
    display: none;
  }

  .action-btn {
    padding: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
  }

  .action-btn .desktop-text {
    display: none;
  }
  .ruang-sarung-btn .desktop-text {
    display: inline;
  }
  #filterToggleBtn .desktop-text {
    display: inline;
  }

  #filterToggleBtn {
      position: fixed;
      right: 18px;
      bottom: 70px;
      z-index: 9999;

      width: auto;
      min-width: 96px;
      height: 52px;
      padding: 0 16px;

      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;

      border-radius: 999px;
      border: 1px solid rgba(255,255,255,.45);

      background: rgba(40, 110, 62, 0.78);
      color: #fff;

      box-shadow: 0 8px 24px rgba(20,70,40,.25);

      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);

      font-weight: 600;
      white-space: nowrap;
  }

  .ruang-sarung-btn {
    width: auto;
    border-radius: 20px;
    padding: 8px 12px;
    white-space: nowrap;
    background: var(--primary) !important;
    color: white !important;
    border: 1px solid var(--primary) !important;
  }

  .ig-btn img {
    margin: 0;
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.4rem !important;
  }

  .card-body {
    padding: 6px !important;
  }

  .product-name {
    font-size: 0.65rem !important;
    line-height: 1.1;
    margin-bottom: 2px !important;
  }

  .product-price {
    font-size: 0.75rem !important;
  }

  .kategori-label {
    font-size: 0.5rem !important;
    margin-bottom: 2px !important;
  }

  .product-variants {
    font-size: 0.55rem !important;
    margin-bottom: 4px !important;
  }

  .stok-badge {
    font-size: 0.5rem !important;
    padding: 2px 4px !important;
  }
}

/* Main Area */
.main-container {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 80vh;
}

/* Grid Layout (Mobile First) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Product Card */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.card:active {
  transform: scale(0.98);
}

.card-img-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #eee;
  position: relative;
  overflow: hidden;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stok-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 10;
}

.stok-badge.empty {
  background: var(--danger-color, #ea4335);
}

.card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.kategori-label {
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-variants {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.product-price {
  margin-top: auto;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

/* Utility */
.hidden {
  display: none !important;
}

.no-result {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  color: var(--primary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(53, 97, 45, 0.2);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: 20px;
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 20;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.modal-image-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: #f0f0f0;
  border-bottom: 1px solid #eaeaea;
}

.modal-image-slider::-webkit-scrollbar {
  display: none;
}

.modal-image {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  flex: 0 0 100%;
  scroll-snap-align: start;
  object-fit: contain;
  background-color: transparent;
}

.modal-details {
  padding: 24px;
  overflow-y: auto;
  background: white;
}

@media (min-width: 768px) {
  .modal-content {
    max-width: 900px;
    padding: 0;
    flex-direction: row-reverse;
  }

  .modal-image-slider {
    flex: 1.2;
    border-bottom: none;
    border-left: 1px solid #eaeaea;
    background: #f8f9fa;
    align-items: center;
  }

  .modal-details {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    text-align: left;
  }

  .modal-image {
    max-height: 80vh;
  }
}

.modal-title-wix {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 15px;
  line-height: 1.2;
}

.modal-price-wix {
  font-size: 1.2rem;
  color: #2b5cff;
  /* Wix blue */
  margin-bottom: 15px;
  font-weight: 500;
}

.modal-sku-wix {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 25px;
}

.modal-variants-wix {
  margin-bottom: 25px;
}

.variant-group {
  margin-bottom: 15px;
}

.variant-label-wix {
  display: block;
  font-size: 0.9rem;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.variant-value-wix {
  font-size: 0.95rem;
  color: #555;
}

.qty-box-wix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border: 1px solid #ccc;
  font-size: 1rem;
  min-width: 80px;
}

.modal-desc-title-wix {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 5px;
  margin-top: 15px;
}

.modal-desc-text-wix {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-top: 10px;
}

.product-name-large {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.modal-price {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: bold;
  margin-bottom: 15px;
}

.deskripsi-box {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--border);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: pre-wrap;
}

/* Print Modal Styles */
.print-modal-content {
  max-width: 600px;
  width: 95%;
}

.print-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.print-item:last-child {
  border-bottom: none;
}

.print-item-info {
  flex: 1;
  font-size: 0.9rem;
}

.print-item-qty {
  width: 60px;
  padding: 5px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
/* SEO Intro Homepage */
.seo-intro {
  max-width: 900px;
  margin: 18px auto 8px;
  padding: 0 18px;
  text-align: center;
}

.seo-intro h1 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: #2f4f2f;
}

.seo-intro p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
  font-style: italic;
}

@media (max-width: 768px) {
  .seo-intro {
    margin: 14px auto 6px;
    padding: 0 14px;
  }

  .seo-intro h1 {
    font-size: 18px;
  }

  .seo-intro p {
    font-size: 13px;
  }
}
