/* ==========================================================================
   PANCHO.SI - SHOP, PRODUCT DETAIL & SIZE GUIDE COMPONENT STYLES
   ========================================================================== */

/* ==================== SHOP / COLLECTION PAGE ==================== */
.shop-hero-header {
  background: var(--pancho-sand-card);
  padding: 50px 0 40px;
  border-bottom: 1px solid var(--pancho-sand-border);
  margin-bottom: 40px;
}

.shop-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--pancho-gray-600);
  margin-bottom: 16px;
}

.shop-breadcrumb a:hover {
  color: var(--pancho-terracotta);
}

.quick-category-pills {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-top: 24px;
}

.cat-pill {
  padding: 10px 22px;
  border-radius: var(--radius-full);
  background: var(--pancho-white);
  border: 1px solid var(--pancho-sand-border);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pancho-espresso);
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cat-pill:hover, .cat-pill.active {
  background: var(--pancho-terracotta);
  color: var(--pancho-white);
  border-color: var(--pancho-terracotta);
  box-shadow: 0 4px 12px var(--pancho-terracotta-glow);
}

/* Shop Layout (Sidebar + Grid) */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin-bottom: 80px;
}

.filter-sidebar {
  background: var(--pancho-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--pancho-sand-border);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filter-group {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pancho-sand-border);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-options-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--pancho-espresso-light);
}

.filter-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--pancho-terracotta);
  border-radius: 4px;
}

.size-pill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.size-filter-btn {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--pancho-sand-bg);
  border: 1px solid var(--pancho-sand-border);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.size-filter-btn:hover, .size-filter-btn.active {
  background: var(--pancho-terracotta);
  color: var(--pancho-white);
  border-color: var(--pancho-terracotta);
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pancho-sand-border);
}

.shop-sort-select {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--pancho-sand-border);
  background: var(--pancho-white);
  color: var(--pancho-espresso);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

/* ==================== PRODUCT DETAIL PAGE (PDP) ==================== */
.pdp-section {
  padding: 40px 0 80px;
}

.pdp-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: start;
}

/* Gallery */
.pdp-gallery-wrapper {
  display: flex;
  gap: 20px;
  position: sticky;
  top: 100px;
}

.pdp-thumbs-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 90px;
}

.pdp-thumb-item {
  width: 90px;
  height: 105px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--pancho-sand-border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pdp-thumb-item.active, .pdp-thumb-item:hover {
  border-color: var(--pancho-terracotta);
  box-shadow: var(--shadow-sm);
}

.pdp-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-main-image-box {
  flex-grow: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--pancho-sand-card);
  border: 1px solid var(--pancho-sand-border);
  box-shadow: var(--shadow-md);
  position: relative;
  aspect-ratio: 4/5;
}

.pdp-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PDP Info & Buy Box */
.pdp-info-box {
  display: flex;
  flex-direction: column;
}

.pdp-badges-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.pdp-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
  line-height: 1.25;
}

.pdp-rating-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.pdp-price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pancho-sand-border);
}

.pdp-current-price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--pancho-terracotta);
}

.pdp-old-price {
  font-size: 1.25rem;
  color: var(--pancho-gray-600);
  text-decoration: line-through;
}

.pdp-points-callout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pancho-butter-light);
  border: 1px solid #F6D06F;
  color: #8C6203;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 28px;
}

/* Pattern Selection */
.pdp-option-section {
  margin-bottom: 24px;
}

.option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 700;
}

.pattern-swatch-picker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pattern-swatch-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--pancho-sand-border);
  background: var(--pancho-white);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.pattern-swatch-item .swatch-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.pattern-swatch-item.active, .pattern-swatch-item:hover {
  border-color: var(--pancho-terracotta);
  background: var(--pancho-terracotta-light);
  color: var(--pancho-terracotta);
}

/* Size Selection */
.size-guide-modal-trigger {
  color: var(--pancho-terracotta);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: underline;
}

.pdp-sizes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.pdp-size-card {
  padding: 12px 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--pancho-sand-border);
  background: var(--pancho-white);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pdp-size-card .size-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.pdp-size-card .size-sub {
  font-size: 0.72rem;
  color: var(--pancho-gray-600);
}

.pdp-size-card.active, .pdp-size-card:hover {
  border-color: var(--pancho-terracotta);
  background: var(--pancho-terracotta);
  color: var(--pancho-white);
}

.pdp-size-card.active .size-sub, .pdp-size-card:hover .size-sub {
  color: rgba(255, 255, 255, 0.85);
}

/* Custom Tailoring Note (Po pasjih merah) */
.custom-tailor-box {
  background: var(--pancho-sage-light);
  border: 1px solid #C4DFC8;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 28px;
}

.custom-tailor-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #2F6339;
  font-size: 0.92rem;
  cursor: pointer;
}

.custom-measurements-inputs {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.custom-measurements-inputs input {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--pancho-gray-400);
  background: var(--pancho-white);
  font-size: 0.85rem;
}

/* PDP CTA Actions */
.pdp-actions-row {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
}

.pdp-qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--pancho-sand-border);
  border-radius: var(--radius-full);
  background: var(--pancho-white);
  padding: 0 4px;
}

.pdp-qty-btn {
  background: none;
  border: none;
  width: 36px;
  height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-qty-val {
  width: 38px;
  text-align: center;
  font-weight: 700;
  border: none;
  font-size: 1rem;
}

.pdp-add-btn {
  flex-grow: 1;
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* Complete the Look Bundle Card */
.bundle-upsell-box {
  background: var(--pancho-sand-card);
  border: 1px solid var(--pancho-sand-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}

.bundle-title {
  font-size: 1.05rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bundle-items-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.bundle-item-thumb {
  width: 64px;
  height: 74px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--pancho-sand-border);
}

.bundle-plus-sign {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--pancho-terracotta);
}

/* PDP Tabs Accordion */
.pdp-tabs-wrapper {
  margin-top: 50px;
  border-top: 1px solid var(--pancho-sand-border);
  padding-top: 40px;
}

.tab-accordion-item {
  border-bottom: 1px solid var(--pancho-sand-border);
}

.tab-accordion-header {
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.tab-accordion-content {
  padding-bottom: 24px;
  color: var(--pancho-espresso-light);
  line-height: 1.7;
}

/* ==================== SIZE GUIDE DEDICATED CALCULATOR PAGE ==================== */
.size-guide-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.size-diagram-box {
  background: var(--pancho-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--pancho-sand-border);
  padding: 40px;
  box-shadow: var(--shadow-md);
  margin-bottom: 50px;
  text-align: center;
}

.size-table-wrapper {
  background: var(--pancho-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--pancho-sand-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: 40px;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.size-table th {
  background: var(--pancho-espresso);
  color: var(--pancho-white);
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.size-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--pancho-sand-border);
  font-size: 0.92rem;
}

.size-table tr:nth-child(even) {
  background: var(--pancho-sand-bg);
}

.size-table tr:hover {
  background: var(--pancho-terracotta-light);
}

/* Modal Popup for Size Guide */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(42, 34, 32, 0.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.modal-card {
  background: var(--pancho-white);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-bounce);
}

.modal-backdrop.open .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--pancho-sand-bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Sticky Bar on PDP */
.mobile-sticky-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--pancho-white);
  border-top: 1px solid var(--pancho-sand-border);
  padding: 12px 20px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  display: none;
  z-index: 990;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .filter-sidebar {
    display: none; /* toggleable via filter modal */
  }
  .pdp-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .pdp-gallery-wrapper {
    position: static;
    flex-direction: column-reverse;
  }
  .pdp-thumbs-col {
    flex-direction: row;
    width: 100%;
  }
  .pdp-thumb-item {
    width: 70px;
    height: 80px;
  }
  .mobile-sticky-buy-bar {
    display: flex;
  }
}
