*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

/* ══════════════════════════════════════════
       LAYOUT WRAPPER
    ══════════════════════════════════════════ */
.container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ══════════════════════════════════════════
       BREADCRUMB
    ══════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 0 12px;
  font-size: 12px;
  color: var(--gray-500);
}

.breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--black);
  text-decoration: underline;
}

.breadcrumb-sep {
  font-size: 10px;
}

/* ══════════════════════════════════════════
       PAGE HEADER
    ══════════════════════════════════════════ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 8px 0 24px;
  gap: 12px;
}

.page-header h1 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.result-meta {
  text-align: right;
  flex-shrink: 0;
}

.result-meta .category-label {
  font-size: 13px;
  color: var(--gray-500);
}

.result-meta .result-count {
  font-size: 13px;
  color: var(--gray-500);
}

/* ══════════════════════════════════════════
       HEADLINE (BIG TEXT)
    ══════════════════════════════════════════ */
.headline {
  padding: 56px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
}

.headline h1 {
  font-size: clamp(32px, 5vw, 42px);
  font-weight: 500;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--black);
}

.headline p {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--gray-500);
  line-height: 1.6;
  font-weight: 400;
}

/* ══════════════════════════════════════════

       FILTER BAR
    ══════════════════════════════════════════ */
.filter-section {
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  position: sticky;
  top: 56px;
  /* height of navbar */
  z-index: 90;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  margin-right: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  background: var(--white);
  white-space: nowrap;
  font-family: var(--font);
  transition:
    border-color var(--transition),
    background var(--transition);
}

.filter-chip:hover {
  border-color: var(--black);
}

.filter-chip.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.filter-spacer {
  flex: 1;
  min-width: 0;
}

.filter-open-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  background: var(--white);
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: border-color var(--transition);
}

.filter-open-btn:hover {
  border-color: var(--black);
}

.filter-open-btn svg {
  width: 13px;
  height: 13px;
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  padding: 7px 32px 7px 14px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--black);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23111' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      no-repeat right 12px center,
    var(--white);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.sort-select:hover {
  border-color: var(--black);
}

/* ══════════════════════════════════════════
       SEARCH BAR
    ══════════════════════════════════════════ */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 12px;
  width: 14px;
  height: 14px;
  color: var(--gray-400);
  pointer-events: none;
  flex-shrink: 0;
  transition: color var(--transition);
}

.search-input {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  padding: 7px 32px 7px 34px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--black);
  background: var(--white);
  outline: none;
  width: 200px;
  transition:
    border-color var(--transition),
    width 0.3s ease,
    box-shadow var(--transition);
}

.search-input::placeholder {
  color: var(--gray-400);
  font-weight: 400;
}

.search-input:hover {
  border-color: var(--gray-500);
}

.search-input:focus {
  border-color: var(--black);
  width: 260px;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.07);
}

.search-input:focus + .search-icon,
.search-wrapper:focus-within .search-icon {
  color: var(--black);
}

/* Hide default browser clear (×) button in search input */
.search-input::-webkit-search-cancel-button {
  display: none;
}

/* ══════════════════════════════════════════
       CARD RENDER ANIMATION
    ══════════════════════════════════════════ */
@keyframes cardFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════
       MAIN LAYOUT & SIDEBAR
    ══════════════════════════════════════════ */
.main-layout {
  display: flex;
  align-items: flex-start;
}

.sidebar-filter {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: 112px;
  height: calc(100vh - 124px);
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 0px;
}

.sidebar-filter::-webkit-scrollbar {
  width: 4px;
}

.sidebar-filter::-webkit-scrollbar-thumb {
  background: var(--gray-200);
  border-radius: 4px;
}

.sidebar-header {
  display: none;
}

.sidebar-block {
  padding: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-block:last-child {
  border-bottom: none;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--black);
}

.sidebar-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--gray-600);
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}

.sidebar-check:hover {
  color: var(--black);
}

.sidebar-check input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--black);
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  backdrop-filter: blur(2px);
}

/* ══════════════════════════════════════════
       PRODUCT GRID
    ══════════════════════════════════════════ */
.products-section {
  padding: 24px;
  flex: 1;
  min-width: 0;
  background: var(--gray-100);
  border-right: 1px solid var(--gray-200);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ══════════════════════════════════════════
       PRODUCT CARD
    ══════════════════════════════════════════ */
.product-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--black);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  /* staggered animation via inline style --i */
  opacity: 0;
  animation: cardFadeUp 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  border-color: var(--gray-300);
}

.card-img-wrap {
  background: var(--gray-100);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

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

.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  color: var(--gray-400);
}

.card-img-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.5;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 7px;
  border-radius: 3px;
  color: var(--white);
}

.card-badge.sale {
  background: var(--red);
}

.card-badge.new {
  background: var(--green);
}

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

.card-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 2px;
  /* clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-subtitle {
  font-size: 11.5px;
  color: var(--gray-500);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-color {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 6px;
}

.card-price {
  font-size: 17px;
  font-weight: 700;
}

.card-price.sale {
  color: var(--red);
}

.card-price-original {
  font-size: 11px;
  color: var(--gray-400);
  text-decoration: line-through;
}

/* Action buttons row */
.card-actions {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.btn-beli {
  flex: 1;
  padding: 7px 0;
  background: var(--black);
  color: var(--white);
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.btn-beli:hover {
  background: #333;
  transform: scale(1.02);
}

.btn-beli svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.btn-keranjang {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background: var(--white);
  color: var(--black);
  border: 1.5px solid var(--gray-300);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease;
}

.btn-keranjang:hover {
  border-color: var(--black);
  background: var(--gray-100);
  transform: scale(1.06);
}

.btn-keranjang svg {
  width: 15px;
  height: 15px;
}

/* ══════════════════════════════════════════
       PAGINATION
    ══════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 30px;
}

.page-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--gray-300);
  border-radius: 50%;
  background: var(--white);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    border-color var(--transition),
    background var(--transition);
}

.page-btn:hover {
  border-color: var(--black);
}

.page-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.page-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.page-dots {
  font-size: 13px;
  color: var(--gray-400);
  padding: 0 2px;
}

/* ══════════════════════════════════════════
       RESPONSIVE — TABLET (≤ 960px)
    ══════════════════════════════════════════ */
@media (max-width: 960px) {
  .topbar {
    padding: 0 20px;
  }

  .topbar-right {
    display: flex;
    gap: 10px;
    font-size: 10.5px;
  }

  .topbar-left {
    font-size: 9.5px;
  }

  nav.navbar {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
  }

  .container {
    padding: 0 20px;
  }

  .main-layout {
    gap: 0;
  }

  .filter-open-btn {
    display: inline-flex;
  }

  .sidebar-filter {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: var(--white);
    z-index: 1001;
    padding: 0;
    border-radius: 0;
    border: none;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
  }

  .sidebar-filter.open {
    left: 0;
  }

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

  .sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
  }

  .sidebar-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-overlay.open {
    display: block;
  }

  .products-section {
    padding: 16px;
    border-radius: 0;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .result-meta {
    text-align: left;
  }

  .filter-spacer {
    display: none;
  }
}

/* ══════════════════════════════════════════
       RESPONSIVE — MOBILE (≤ 540px)
    ══════════════════════════════════════════ */
@media (max-width: 540px) {
  #topbar {
    flex-wrap: nowrap;
    height: auto;
    min-height: 34px;
    padding: 5px 12px;
    gap: 0;
    justify-content: space-between;
    align-items: center;
  }

  .topbar-left {
    font-size: 8.5px;
    width: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
  }

  .topbar-right {
    display: flex;
    gap: 8px;
    font-size: 9.5px;
    width: auto;
    flex-shrink: 0;
  }

  .topbar-right a {
    font-size: 9.5px;
    white-space: nowrap;
  }

  nav.navbar {
    padding: 0 12px;
    height: 52px;
  }

  .filter-section {
    top: 52px;
  }

  .sidebar-filter {
    top: 0;
  }

  .nav-logo {
    font-size: 19px;
    padding: 0 12px;
  }

  .nav-icon-btn {
    padding: 0 12px;
  }

  .nav-profile-name {
    max-width: 70px;
    font-size: 11px;
  }

  .container {
    padding: 0 12px;
  }

  .container.main-layout {
    padding: 0;
  }

  #total-product {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .card-body {
    padding: 10px;
  }

  .card-name {
    font-size: 13px;
  }

  .card-subtitle {
    font-size: 11px;
  }

  .card-price {
    font-size: 15px;
  }

  .btn-beli {
    font-size: 10.5px;
    padding: 6px 0;
  }

  .btn-keranjang {
    width: 30px;
    height: 30px;
  }

  .filter-bar {
    gap: 8px;
    padding: 12px 0;
    justify-content: space-between;
  }

  .filter-label {
    font-size: 12px;
    margin-right: 0;
  }

  .search-wrapper {
    flex: 1;
    margin: 0 4px;
  }

  .search-input {
    width: 100%;
    min-width: 0;
    padding: 6px 12px 6px 28px;
    font-size: 12px;
  }

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

  .search-wrapper .search-icon {
    left: 8px;
    width: 12px;
    height: 12px;
  }

  .filter-open-btn {
    font-size: 12px;
    padding: 6px 10px;
    gap: 4px;
  }

  .sort-select {
    display: none;
  }

  .pagination {
    gap: 4px;
    margin-top: 20px;
  }

  .page-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .auth-modal {
    width: calc(100% - 32px);
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .auth-panel {
    padding: 32px 24px 24px;
  }
}

/* ══════════════════════════════════════════
       RESPONSIVE — MOBILE KECIL (≤ 380px)
    ══════════════════════════════════════════ */
@media (max-width: 380px) {
  .nav-profile-name {
    display: none;
  }

  .nav-profile-chip {
    padding: 3px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card-name {
    font-size: 12px;
  }

  .btn-beli span {
    display: none;
  }

  /* Hide 'Beli' text to save space */
}

/* ══════════════════════════════════════════
       RESPONSIVE — MOBILE SANGAT KECIL (≤ 340px)
    ══════════════════════════════════════════ */
@media (max-width: 340px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════
       CART SIDEBAR
    ══════════════════════════════════════════ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background: var(--white);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.open {
  transform: translateX(0);
}

/* Header */
.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.cart-sidebar-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-sidebar-title svg {
  width: 18px;
  height: 18px;
}

.cart-sidebar-close {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  transition: background 0.2s;
}

.cart-sidebar-close:hover {
  background: var(--gray-100);
}

.cart-sidebar-close svg {
  width: 18px;
  height: 18px;
}

/* Body — scrollable list */
.cart-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Empty state */
.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gray-400);
  font-size: 13px;
  padding: 40px 0;
}

.cart-empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

/* Cart item row */
.cart-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-100);
}

.cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cart-item-img {
  width: 64px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gray-100);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-type {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 6px;
}

.cart-item-price {
  font-size: 13px;
  font-weight: 700;
}

/* Qty control */
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 6px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  width: fit-content;
  overflow: hidden;
}

.qty-btn {
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  transition: background 0.15s;
}

.qty-btn:hover {
  background: var(--gray-100);
}

.qty-val {
  width: 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  border-left: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  line-height: 28px;
}

/* Remove btn */
.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 2px;
  border-radius: 4px;
  transition:
    color 0.15s,
    background 0.15s;
  flex-shrink: 0;
}

.cart-item-remove:hover {
  color: var(--red);
  background: #fef2f2;
}

.cart-item-remove svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* Footer */
.cart-sidebar-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.cart-subtotal-label {
  color: var(--gray-500);
}

.cart-subtotal-value {
  font-weight: 700;
  font-size: 15px;
}

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s,
    transform 0.15s;
}

.btn-checkout:hover {
  background: #333;
  transform: scale(1.01);
}

.btn-checkout svg {
  width: 15px;
  height: 15px;
}

.btn-clear-cart {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--gray-400);
  font-family: var(--font);
  align-self: center;
  transition: color 0.15s;
}

.btn-clear-cart:hover {
  color: var(--red);
}

/* ══════════════════════════════════════════
       AUTH MODAL
    ══════════════════════════════════════════ */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-overlay.open {
  opacity: 1;
  visibility: visible;
}

.auth-modal {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 400px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  margin: 0px 20px;
}

.auth-overlay.open .auth-modal {
  transform: translateY(0);
}

.auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray-400);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.auth-close-btn:hover {
  color: var(--black);
}

.auth-panel {
  padding: 30px 25px 32px;
  display: none;
  background-color: transparent;
  border-radius: 20px;
}

.auth-panel.active {
  display: block;
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
  color: var(--black);
  line-height: 1.3;
}

.auth-title span {
  color: var(--gray-400);
}

.auth-title .nav-logo {
  display: inline-block;
  font-size: 22px;
  vertical-align: baseline;
  text-decoration: none;
}

.auth-panel p {
  font-size: 13px;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
  padding: 0 10px;
}

.auth-form-group {
  margin-top: 16px;
}

#lupa-password {
  float: right;
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 5px;
  text-decoration: none;
  transition: color 0.2s;
}

#lupa-password:hover {
  color: var(--gray-600);
}

.auth-input-wrapper {
  position: relative;
  width: 100%;
  margin-top: 14px;
}

.auth-input-prefix {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.auth-input-prefix svg {
  width: 16px;
  height: 16px;
}

.auth-input {
  width: 100%;
  padding: 12px 44px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--black);
  background: var(--gray-50);
  outline: none;
  transition:
    border-color var(--transition),
    background var(--transition);
}

.auth-input::placeholder {
  color: var(--gray-400);
}

.auth-input:focus {
  border-color: var(--gray-400);
  background: var(--white);
}

.auth-input-suffix {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 4px;
  transition: color var(--transition);
}

.auth-input-suffix:hover {
  color: var(--gray-600);
}

.auth-input-suffix svg {
  width: 16px;
  height: 16px;
}

.auth-submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  margin-top: 18px;
  transition:
    opacity var(--transition),
    transform var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.1px;
}

.auth-submit-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
  opacity: 1;
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
}

.auth-switch a {
  color: var(--black);
  font-weight: 600;
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: var(--gray-400);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--gray-200);
}

.auth-divider:not(:empty)::before {
  margin-right: 0.5em;
}

.auth-divider:not(:empty)::after {
  margin-left: 0.5em;
}

.auth-google-btn {
  width: 100%;
  padding: 10px;
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    background 0.2s,
    border-color 0.2s;
  text-decoration: none;
}

.auth-google-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.auth-google-btn img {
  width: 18px;
  height: 18px;
}

/* ══════════════════════════════════════════
       TOAST NOTIFICATION
    ══════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--black);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  transform: translateY(100px);
  opacity: 0;
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.4s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--green);
}

.toast.error {
  background: var(--red);
}

.toast.info {
  background: var(--black);
}

/* ══════════════════════════════════════════
       NOTIFICATION DROPDOWN
    ══════════════════════════════════════════ */
.notif-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--gray-200);
}

.notif-badge {
  display: none;
  position: absolute;
  top: 2px;
  right: 2px;
  background: #e11d48;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  padding: 0 4px;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: 'Inter', sans-serif;
  pointer-events: none;
  z-index: 2;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: -40px;
  width: 380px;
  max-height: 440px;
  background: var(--white);
  border-radius: 12px;
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notif-dropdown-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-dropdown-title svg {
  width: 18px;
  height: 18px;
  color: var(--gray-500);
}

.notif-count-label {
  font-size: 11px;
  background: #fef2f2;
  color: #e11d48;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

.notif-dropdown-header {
  padding: 16px 20px 0 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.notif-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.notif-tabs {
  display: flex;
  gap: 20px;
}

.notif-tab {
  background: none;
  border: none;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  cursor: pointer;
  position: relative;
  font-family: var(--font);
  transition: color var(--transition);
}

.notif-tab:hover {
  color: var(--gray-600);
}

.notif-tab.active {
  color: var(--black);
}

.notif-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--black);
  border-radius: 2px 2px 0 0;
}

.notif-dropdown-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.notif-dropdown-body::-webkit-scrollbar {
  width: 4px;
}

.notif-dropdown-body::-webkit-scrollbar-track {
  background: transparent;
}

.notif-dropdown-body::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 99px;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  transition: background 0.15s;
  cursor: pointer;
  align-items: flex-start;
}

.notif-item:hover {
  background: var(--gray-100);
}

.notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-item-icon.warning {
  background: #fef3c7;
  color: #d97706;
}

.notif-item-icon.danger {
  background: #fef2f2;
  color: #e11d48;
}

.notif-item-icon.success {
  background: #dcfce7;
  color: #16a34a;
}

.notif-item-icon svg {
  width: 18px;
  height: 18px;
}

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--black);
}

.notif-item-desc {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.4;
}

.notif-item-desc strong {
  color: var(--black);
  font-weight: 600;
}

.notif-item-time {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.notif-item-time svg {
  width: 12px;
  height: 12px;
}

.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--gray-400);
  gap: 10px;
}

.notif-empty svg {
  width: 40px;
  height: 40px;
  stroke-width: 1.2;
}

.notif-empty span {
  font-size: 13px;
}

.notif-dropdown-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-200);
  text-align: center;
  flex-shrink: 0;
}

.notif-dropdown-footer a {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  transition: color 0.15s;
}

.notif-dropdown-footer a:hover {
  color: var(--gray-600);
}

.notif-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  display: none;
}

.notif-overlay.open {
  display: block;
}

@keyframes notifPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

.notif-badge.pulse {
  animation: notifPulse 1.5s ease-in-out infinite;
}

/* ══════════════════════════════════════════
       CONFIRM MODAL
    ══════════════════════════════════════════ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-overlay.open {
  opacity: 1;
  visibility: visible;
}

.confirm-modal {
  background: var(--white);
  width: 380px;
  max-width: 90vw;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  text-align: center;
}

.confirm-overlay.open .confirm-modal {
  transform: translateY(0);
}

.confirm-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-message {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
}

.btn-confirm-cancel {
  flex: 1;
  padding: 10px;
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s;
}

.btn-confirm-cancel:hover {
  background: var(--gray-100);
}

.btn-confirm-ok {
  flex: 1;
  padding: 10px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-confirm-ok:hover {
  background: #333;
}

/* ══════════════════════════════════════════
       FOOTER
    ══════════════════════════════════════════ */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 80px 0 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand .logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  display: block;
  margin-bottom: 20px;
}

.footer-brand .logo span {
  color: var(--gray-500);
}

.footer-brand p {
  color: var(--gray-400);
  font-size: 14px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 14px;
  transition: all var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--white);
  transform: translateX(4px);
}

.footer-socials {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: all var(--transition);
  text-decoration: none;
}

.social-btn:hover {
  background: var(--white);
  color: var(--black);
  transform: translateY(-3px);
}

.social-btn svg {
  width: 18px;
  height: 18px;
}

.footer-newsletter {
  background: rgba(255, 255, 255, 0.03);
  padding: 40px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.newsletter-text h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.newsletter-text p {
  color: var(--gray-400);
  font-size: 14px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
}

.newsletter-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font);
  outline: none;
  width: 240px;
  transition: border-color var(--transition);
}

.newsletter-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.newsletter-btn {
  background: var(--white);
  color: var(--black);
  border: none;
  height: 46px;
  padding: 0 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity var(--transition);
}

.newsletter-btn:hover {
  opacity: 0.9;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray-500);
}

.footer-payment-icons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.qris-footer-icon {
  filter: brightness(0) invert(1);
}

@media (max-width: 960px) {
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .footer-newsletter {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .newsletter-input {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

/* ══════════════════════════════════════════
       HELP MODAL
    ══════════════════════════════════════════ */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.help-overlay.open {
  opacity: 1;
  visibility: visible;
}

.help-modal {
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-overlay.open .help-modal {
  transform: translateY(0) scale(1);
}

.help-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.help-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.help-modal-title svg {
  width: 20px;
  height: 20px;
  color: var(--black);
  flex-shrink: 0;
}

.help-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition:
    background 0.2s,
    color 0.2s;
  flex-shrink: 0;
}

.help-modal-close:hover {
  background: var(--gray-100);
  color: var(--black);
}

.help-modal-close svg {
  width: 18px;
  height: 18px;
}

.help-modal-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Search hint */
.help-search-hint {
  background: var(--gray-100);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.55;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.help-search-hint svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--gray-500);
}

/* Section heading */
.help-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gray-400);
  margin-bottom: 6px;
}

/* FAQ accordion */
.help-faq {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.help-faq-item {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}

.help-faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s;
}

.help-faq-q:hover {
  background: var(--gray-100);
}

.help-faq-q svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--gray-400);
  transition: transform 0.25s ease;
}

.help-faq-item.open .help-faq-q svg {
  transform: rotate(180deg);
}

.help-faq-a {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.2s ease;
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.6;
  padding: 0 14px;
}

.help-faq-item.open .help-faq-a {
  max-height: 200px;
  padding: 2px 14px 14px;
}

/* Contact row */
.help-contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  text-decoration: none;
  color: var(--black);
  font-size: 13px;
  font-weight: 500;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.help-contact-item:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.help-contact-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-contact-icon svg {
  width: 16px;
  height: 16px;
  color: var(--black);
}

.help-contact-info {
  flex: 1;
  min-width: 0;
}

.help-contact-label {
  font-weight: 600;
  font-size: 13px;
}

.help-contact-sub {
  font-size: 11.5px;
  color: var(--gray-500);
  margin-top: 1px;
}

.help-contact-arrow {
  color: var(--gray-400);
  flex-shrink: 0;
}

.help-contact-arrow svg {
  width: 14px;
  height: 14px;
}

/* ══════════════════════════════════════════
       PRODUCT DETAIL MODAL
    ══════════════════════════════════════════ */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: right;
}

.product-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.product-modal {
  background: var(--white);
  width: 1000px;
  max-width: 400px;
  height: 100%;
  max-height: 100%;
  position: relative;
  transform: translateX(20px) scale(0.98);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-modal-overlay.open .product-modal {
  transform: translateY(0) scale(1);
}

/* When shifted left (cart open) */
.product-modal.shifted {
  transform: translateX(-190px);
}

.product-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  font-size: 24px;
  color: var(--black);
  cursor: pointer;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.product-modal-close:hover {
  transform: scale(1.1) rotate(90deg);
}

.product-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.product-modal-img-wrap {
  flex: 1.3;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal-info {
  flex: 1;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--white);
}

.pm-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--black);
}

.pm-type {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pm-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.pm-desc {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 32px;
  flex-grow: 1;
}

.pm-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition:
    background 0.25s,
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pm-buy-btn:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

.pm-buy-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 900px) {
  .product-modal {
    width: 92vw;
    height: 90vh;
  }
  .product-modal-content {
    flex-direction: column;
  }
  .product-modal-img-wrap {
    height: 300px;
    flex: none;
  }
  .product-modal.shifted {
    transform: translateX(0) scale(0.95);
  }
}

/* ══════════════════════════════════════════
       RESPONSIVE — MOBILE (≤ 540px)
   ══════════════════════════════════════════ */
@media (max-width: 540px) {
  .product-modal-overlay {
    justify-content: center;
    align-items: center;
  }

  .product-modal {
    width: 95vw;
    height: 85vh;
    max-height: 85vh;
    max-width: none;
    border-radius: 12px;
  }

  .product-modal-img-wrap {
    height: 180px;
    flex: none;
  }

  .product-modal-info {
    padding: 20px 16px;
  }

  .pm-title {
    font-size: 20px;
  }

  .pm-type {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .pm-price {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .pm-desc {
    font-size: 13.5px;
    margin-bottom: 20px;
    line-height: 1.5;
  }

  .pm-buy-btn {
    padding: 12px;
    font-size: 14px;
    border-radius: 8px;
  }

  .product-modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
}
