/* Default navbar — untuk semua halaman */
.navbar {
  position: fixed;
  top: 0;        /* default tanpa announcement bar */
  left: 0;
  right: 0;
  z-index: 1030;
  width: 100%;
}

/* Khusus frontpage — geser ke bawah announcement bar */
body.path-frontpage .navbar {
  top: 38px;
}

/* WAJIB: tambahkan padding-top ke body agar konten tidak tertutup navbar */
/* Total = tinggi announcement bar + tinggi navbar */
body {padding-top: 64px !important;}
body.path-frontpage {
  padding-top: 100px !important;  /* ukur dulu tinggi keduanya, sesuaikan */
}



/* ─── Wrapper kartu produk ───────────────────────────────────────────────── */
.product-item-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.product-item-wrapper:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  transform: translateY(-3px);
}

/* ─── Container gambar — HARUS position: relative ───────────────────────── */
.product-image-container {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.product-image-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

.product-item-wrapper:hover .product-image-container img {
  transform: scale(1.04);
}

/* ─── SALE Ribbon ────────────────────────────────────────────────────────── */
/*
 * Teknik ribbon sudut kanan atas:
 *  - .sale-ribbon di-absolute di pojok kanan atas container gambar
 *  - rotate(45deg) → miring ke arah sudut kanan atas
 *  - top + right diatur agar ribbon terpotong rapi di sudut gambar
 *  - overflow: hidden pada .product-image-container yang memotong sisinya
 */
.sale-ribbon {
  position: absolute;
  top: 16px;
  right: -32px;
  width: 130px;
  background: #e53935;
  color: #fff;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 0;
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.5);
  z-index: 10;
  pointer-events: none;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.sale-ribbon span {
  display: block;
  line-height: 1;
}

/* ─── Quick View overlay ─────────────────────────────────────────────────── */
.qv-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.product-item-wrapper:hover .qv-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.28);
}

.qv-button {
  background: #fff !important;
  color: #111 !important;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 8px 18px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 0.2s, color 0.2s;
}

.qv-button:hover {
  background: #e53935 !important;
  color: #fff !important;
}

/* ─── Info produk ────────────────────────────────────────────────────────── */
.product-info {
  padding: 12px 14px 14px;
}

.product-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-title a {
  color: inherit;
  text-decoration: none;
}

.product-title a:hover {
  color: #e53935;
}

/* ─── Harga ──────────────────────────────────────────────────────────────── */
.product-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.price-from-label {
  font-size: 0.68rem;
  color: #999;
  font-style: italic;
  white-space: nowrap;
}

.price-original {
  font-size: 0.85rem;
  color: #999;
  text-decoration: line-through;
  text-decoration-color: #999;
  font-weight: 400;
  white-space: nowrap;
  margin-right: 4px;
}

.price-amount {
  font-size: 1rem;
  font-weight: 700;
  color: #e53935;
}




/* Quickview: nonaktifkan cursor zoom & pointer events */
.quickview-modal-custom .gallery-main-wrap {
  cursor: default !important;
}
.quickview-modal-custom #gallery-variation-overlay {
  cursor: default !important;
  pointer-events: none !important;
}
.quickview-modal-custom .gallery-main-link {
  cursor: default !important;
  pointer-events: none !important;
}


/* Sembunyikan throbber asli */
.qv-overlay .ajax-progress-throbber {
    display: none !important;
}

/* Berikan efek visual pada tombol saat sedang loading (saat class .progress-disabled muncul) */
.qv-overlay .progress-disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Opsional: Tambahkan animasi pulsasi pada tombol saat diklik */
.qv-button.progress-disabled {
    animation: qv-pulse 1.5s infinite;
}

@keyframes qv-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1); }
}


/* Sembunyikan Titlebar dan Buttonpane bawaan jQuery UI */
.quickview-modal-custom .ui-dialog-titlebar,
.quickview-modal-custom .ui-dialog-buttonpane {
    display: none !important;
}

/* Memastikan border modal tetap bersih */
.quickview-modal-custom {
  padding: 0 !important;
  border: none !important;
  box-shadow: 0 5px 15px rgba(0,0,0,.5);
}

.quickview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Pastikan area form actions terlihat */
.quickview-modal-custom .form-actions {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    margin-top: 20px;
}

/* Memaksa tombol Add to Cart muncul dengan ukuran yang benar */
.quickview-modal-custom .form-actions input[type="submit"],
.quickview-modal-custom .button--add-to-cart {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 45px; /* Memberikan tinggi minimal agar tidak 0 */
    padding: 10px 20px !important;
    visibility: visible !important;
}

/* Kontainer utama gambar */
.product-image-container {
    position: relative;
    overflow: hidden;
}

/* Overlay untuk tombol Quick View */
.qv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* Memberi efek gelap tipis saat hover */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Status awal: Tersembunyi */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

/* Munculkan overlay saat kontainer di-hover */
.product-image-container:hover .qv-overlay {
    opacity: 1;
    visibility: visible;
}

/* Styling tombol Quick View agar terlihat menarik di tengah gambar */
.qv-button {
background-color: #ffffffcf !important;
    color: #333 !important;
    padding: 10px 20px !important;
    text-decoration: none;
    font-size: 13px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease-in-out !important;
    border-radius: 0 !important;
    letter-spacing: 4px;
}

.product-image-container:hover .qv-button {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .qv-overlay {
        opacity: 1;
        visibility: visible;
        background: transparent;
        align-items: flex-end; /* Taruh di bawah gambar saja untuk mobile */
        padding-bottom: 10px;
    }
    
    .qv-button {
        transform: translateY(0);
        font-size: 12px;
        padding: 5px 10px !important;
    }
}



.product-layout.row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 24px;
  align-items: flex-start;
}
.product-gallery-col {
  flex: 0 0 42% !important;
  max-width: 42% !important;
  padding: 0 !important;
}
.product-info-col {
  flex: 1 1 0 !important;
  padding: 0 !important;
}
.field--name-price .field__item,
.commerce-price {
  color: #ee4d2d !important;
  font-size: 1.5rem !important;
  font-weight: 600;
}
.add-to-cart-form .form-submit {
  background-color: #ee4d2d !important;
  border-color: #ee4d2d !important;
  color: #fff !important;
  width: 100% !important;
  padding: 12px !important;
  font-size: 15px !important;
  border-radius: 3px !important;
}
.field--widget-commerce-product-variation-title .form-select {
  display: none !important;
}
@media (max-width: 768px) {
  .product-layout.row { flex-direction: column !important; flex-wrap: wrap !important; }
  .product-gallery-col, .product-info-col { flex: 0 0 100% !important; max-width: 100% !important; }
}

/* ============================================================
   PRODUCT SHORT DESCRIPTION (below add to cart)
   ============================================================ */
.product-short-description {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f8f9fa;
  border-left: 3px solid #e74c3c;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #555;
  line-height: 1.6;
}

.product-short-description p {
  margin: 0;
  font-size: 0.82rem;
}


.product-short-description .field__label {
  display: none;
}

/* ============================================================
   PRODUCT INFORMATION COL (full-width body section)
   ============================================================ */
.product-information-col {
  width: 100%;
  background: #fff;
  margin-top: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  overflow: hidden;
}

.product-information-inner {
  padding: 0;
}

.product-information-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px 16px;
  border-bottom: 2px solid #f0f0f0;
  background: linear-gradient(135deg, #fff 0%, #fef9f9 100%);
}

.product-information-icon {
  display: flex;
  align-items: center;
  color: #e74c3c;
  flex-shrink: 0;
}

.product-information-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #222;
  margin: 0;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.product-information-body {
  padding: 24px 28px;
  font-size: 0.93rem;
  color: #444;
  line-height: 1.75;
}

.product-information-body p {
  margin-bottom: 1em;
}

.product-information-body p:last-child {
  margin-bottom: 0;
}

.product-information-body ul,
.product-information-body ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.product-information-body li {
  margin-bottom: 0.4em;
}

.product-information-body h2,
.product-information-body h3,
.product-information-body h4 {
  font-weight: 700;
  color: #222;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
}

.product-information-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .product-information-header {
    padding: 14px 18px 12px;
  }
  .product-information-body {
    padding: 18px 18px;
  }
  .product-information-title {
    font-size: 0.95rem;
  }
}




/* Make article wrap to allow full-width sections - override commerce_product_gallery */
.path-product article.product-layout,
.page-route-entity-commerce-product-canonical article.product-layout {
  flex-flow: row wrap !important;
}

.product-information-col {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  min-width: 0;
}

/* Hide field label in quickview short description */
.product-body-teaser .field__label {
  display: none;
}

/* === Discount Badge (replaces SALE ribbon) === */
.product-image-container { position: relative; }
.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 70px;
  padding:0 10px;
  height: 25px;
  background: var(--tm-red-2);
  color: #fff;
  border-radius: 5px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-weight: 800;
  text-align: center;
  z-index: 5;
  line-height: 1;
  text-transform: uppercase;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.5px;
}
.discount-badge .discount-percent {
  font-size: 11px;
  display: inline-block;
}
.discount-badge .discount-text {
  font-size: 11px;
  display: inline-block;
}
@media (max-width: 575.98px) {
  .discount-badge { width: 52px; height: 22px; top: 6px; right: 6px; }
  .discount-badge .discount-percent { font-size: 10px; }
  .discount-badge .discount-text { font-size: 10px; }
}

/* Product detail page title: tighter line-height */
.product-info-col > .field--name-title.field--type-string,
.field--name-title.field--type-string {
  line-height: 30px;
}
