/* ============================================================
   WARUNG (RETAILER/BUYER) VIEW STYLES
   ============================================================ */

/* Promo Banner Slider */
.banner-carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.banner-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.banner-slide {
  min-width: 100%;
  padding: 2.25rem 2rem;
  color: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
}

.banner-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.banner-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.banner-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 500px;
  line-height: 1.4;
}

.banner-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.banner-dot.active {
  background: #ffffff;
  width: 22px;
}

/* Kombinasi Gambar & Tulisan */
.banner-slide.banner-slide-combo {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 2.25rem;
  gap: 1.5rem;
}

.banner-content {
  flex: 1;
  min-width: 0;
  z-index: 2;
}

.banner-graphic-box {
  flex-shrink: 0;
  width: 240px;
  max-width: 44%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.banner-graphic-img {
  max-height: 155px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
  transition: transform 0.4s ease;
}

.banner-slide:hover .banner-graphic-img {
  transform: scale(1.05) translateY(-3px);
}

/* Hanya Gambar Grafis Penuh */
.banner-slide.banner-slide-image-only {
  padding: 0;
  min-height: 190px;
  max-height: 250px;
  overflow: hidden;
  position: relative;
  background-color: #042f2e;
}

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

.banner-image-overlay-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 1.5rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  z-index: 2;
}

.banner-overlay-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@media (max-width: 640px) {
  .banner-slide {
    padding: 1.35rem 1.25rem 2rem 1.25rem;
    min-height: 160px;
  }

  .banner-slide.banner-slide-combo {
    padding: 1.25rem 1.15rem 2rem 1.15rem;
    gap: 0.75rem;
  }

  .banner-title {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
  }

  .banner-subtitle {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .banner-graphic-box {
    width: 110px;
  }

  .banner-graphic-img {
    max-height: 105px;
  }

  .banner-slide.banner-slide-image-only {
    min-height: 140px;
    max-height: 190px;
  }
}

/* Search and Filter Section */
.catalog-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  pointer-events: none;
}

.catalog-search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--slate-200);
  background: #ffffff;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.catalog-search-input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.search-clear-btn {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  padding: 0.25rem;
}

/* Category Chips */
.category-chips-scroll {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
}

.category-chips-scroll::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.category-chip:hover {
  border-color: var(--primary-400);
  color: var(--primary-800);
}

.category-chip.active {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
  color: #ffffff;
  border-color: var(--primary-800);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

/* Product Cards Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
}

.product-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-200);
}

.product-image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--slate-50);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.product-card:hover .product-img {
  transform: scale(1.04);
}

.product-sku-tag {
  display: none !important;
}

.product-stock-tag {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

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

.product-cat-name {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--primary-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.35rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.product-unit-info {
  font-size: 0.775rem;
  color: var(--slate-500);
  margin-bottom: 0.6rem;
}

.product-price-box {
  margin-top: auto;
  padding-top: 0.5rem;
}

.product-price-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: uppercase;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary-900);
}

.product-tier-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.5rem 0;
}

.product-actions {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Quantity controls */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 0.2rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: var(--radius-sm);
  color: var(--slate-700);
  font-weight: bold;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.qty-btn:active {
  background: var(--slate-200);
}

.qty-input {
  width: 38px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--slate-900);
}

/* Cart & Checkout Page */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

.cart-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.cart-item-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--slate-100);
}

.cart-item-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--slate-50);
}

.cart-item-meta h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.cart-item-unit {
  font-size: 0.75rem;
  color: var(--slate-500);
}

.cart-item-subtotal {
  font-weight: 800;
  color: var(--primary-900);
  font-size: 0.95rem;
  text-align: right;
}

.cart-item-remove {
  color: var(--slate-400);
  padding: 0.35rem;
}

.cart-item-remove:hover {
  color: var(--danger);
}

/* Checkout Radio Options */
.checkout-option-card {
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: var(--transition);
}

.checkout-option-card:hover {
  border-color: var(--primary-400);
}

.checkout-option-card.selected {
  border-color: var(--primary-600);
  background: var(--primary-50);
}

.option-radio {
  margin-top: 0.2rem;
  accent-color: var(--primary-700);
}

.option-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.option-desc {
  font-size: 0.8rem;
  color: var(--slate-500);
  margin-top: 0.2rem;
}

/* Order Summary Box */
.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.875rem;
  color: var(--slate-600);
}

.summary-line.total {
  border-top: 1.5px dashed var(--slate-200);
  padding-top: 0.85rem;
  margin-top: 0.85rem;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary-950);
}

/* Order Tracking Timeline */
.timeline-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 1.5rem 0 2rem 0;
}

.timeline-stepper::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  height: 3px;
  background: var(--slate-200);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 25%;
}

.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--slate-300);
  color: var(--slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.timeline-step.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.timeline-step.active .step-circle {
  background: var(--primary-700);
  border-color: var(--primary-400);
  color: white;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.2);
}

.step-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--slate-500);
}

.timeline-step.active .step-title {
  color: var(--primary-900);
}

/* Chat Component */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 520px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.chat-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--primary-800), var(--primary-900));
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-messages-container {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: #f8fafc;
}

.chat-bubble {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.4;
  position: relative;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.received {
  align-self: flex-start;
  background: #ffffff;
  color: var(--slate-800);
  border: 1px solid var(--slate-200);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.chat-time {
  font-size: 0.65rem;
  opacity: 0.75;
  margin-top: 0.25rem;
  display: block;
  text-align: right;
}

.chat-order-ref {
  display: inline-block;
  background: rgba(0, 0, 0, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.chat-input-bar {
  padding: 0.85rem 1rem;
  background: #ffffff;
  border-top: 1px solid var(--slate-200);
  display: flex;
  gap: 0.5rem;
}

.chat-input {
  flex: 1;
  padding: 0.65rem 0.95rem;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
}

.chat-input:focus {
  border-color: var(--primary-600);
}

/* ============================================================
   WARUNG MOBILE RESPONSIVE STYLES (SMARTPHONE & TABLET)
   ============================================================ */
@media (max-width: 640px) {
  /* Search & Filter Bar */
  .catalog-filter-bar {
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .catalog-search-input {
    padding: 0.7rem 0.85rem 0.7rem 2.5rem;
    font-size: 0.875rem;
  }

  .search-icon {
    left: 0.85rem;
  }

  .category-chips-scroll {
    gap: 0.4rem;
    padding-bottom: 0.2rem;
  }

  .category-chip {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    gap: 0.35rem;
  }

  /* Products Grid & Product Card */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .product-card {
    border-radius: var(--radius-md);
  }

  .product-sku-tag {
    font-size: 0.55rem;
    padding: 0.1rem 0.35rem;
    top: 0.35rem;
    left: 0.35rem;
  }

  .product-stock-tag {
    font-size: 0.55rem;
    padding: 0.15rem 0.4rem;
    top: 0.35rem;
    right: 0.35rem;
  }

  .product-content {
    padding: 0.55rem 0.5rem 0.65rem;
  }

  .product-cat-name {
    font-size: 0.62rem;
    margin-bottom: 0.15rem;
  }

  .product-title {
    font-size: 0.8rem;
    line-height: 1.25;
    height: 2.5em;
    margin-bottom: 0.2rem;
  }

  .product-unit-info {
    font-size: 0.68rem;
    margin-bottom: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-tier-list {
    gap: 0.2rem;
    margin: 0.2rem 0;
  }

  .tier-tag {
    font-size: 0.58rem;
    padding: 0.1rem 0.3rem;
  }

  .product-price-label {
    font-size: 0.58rem;
  }

  .product-price {
    font-size: 0.95rem;
    font-weight: 800;
  }

  /* Responsive Tombol Beli & Stepper di Ukuran HP */
  .product-actions {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
  }

  .product-actions .qty-stepper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    padding: 2px;
    box-sizing: border-box;
    height: 32px;
  }

  .product-actions .qty-stepper .qty-btn {
    width: 32px;
    height: 26px;
    min-width: 32px;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    touch-action: manipulation;
  }

  .product-actions .qty-stepper .qty-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0;
  }

  .product-actions .btn-add-cart,
  .product-actions button.btn-primary {
    width: 100% !important;
    height: 34px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
    touch-action: manipulation;
  }

  /* Cart Layout on Mobile */
  .cart-card {
    padding: 0.85rem;
    border-radius: var(--radius-md);
  }

  .cart-item-row {
    display: grid;
    grid-template-columns: 52px 1fr;
    grid-template-rows: auto auto;
    gap: 0.35rem 0.65rem;
    padding: 0.85rem 0;
    position: relative;
    align-items: start;
    border-bottom: 1px solid var(--slate-100);
  }

  .cart-item-thumb {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
  }

  .cart-item-meta {
    grid-column: 2;
    grid-row: 1;
    padding-right: 2.2rem;
  }

  .cart-item-meta h4 {
    font-size: 0.825rem;
    line-height: 1.3;
    margin-bottom: 0.15rem;
    color: var(--slate-900);
  }

  .cart-item-unit {
    font-size: 0.72rem;
  }

  .cart-item-stepper-wrap {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    margin-top: 0.25rem;
  }

  .cart-item-stepper-wrap .qty-stepper {
    height: 30px;
    padding: 2px;
    background: var(--slate-100);
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
  }

  .cart-item-stepper-wrap .qty-btn {
    width: 26px;
    height: 24px;
    font-size: 1rem;
    background: #ffffff;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cart-item-stepper-wrap .qty-input {
    width: 32px;
    font-size: 0.82rem;
    text-align: center;
  }

  .cart-item-subtotal-wrap {
    position: static;
  }

  .cart-item-subtotal-wrap .cart-item-subtotal {
    position: absolute;
    bottom: 0.85rem;
    right: 0;
    font-size: 0.925rem;
    font-weight: 800;
    color: var(--primary-900);
  }

  .cart-item-subtotal-wrap .cart-item-remove {
    position: absolute;
    top: 0.65rem;
    right: 0;
    padding: 0.35rem;
    color: var(--danger);
    background: #fef2f2;
    border-radius: var(--radius-sm);
    border: 1px solid #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Checkout Options & Breakdown on Mobile */
  .checkout-option-card {
    padding: 0.75rem 0.85rem;
    gap: 0.6rem;
  }

  .option-title {
    font-size: 0.85rem;
  }

  .option-desc {
    font-size: 0.75rem;
  }

  .summary-line {
    font-size: 0.825rem;
  }

  .summary-line.total {
    font-size: 1.05rem;
  }
}

