/* ==========================================================================
   Product, Sticker & Quote Calculator Styles
   ========================================================================== */

/* Single Product Layout */
.product-single-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 50px;
  margin-bottom: 60px;
}

@media (max-width: 992px) {
  .product-single-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Product Gallery */
.product-gallery {
  position: sticky;
  top: 100px;
}

.gallery-main-view {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

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

.gallery-main-view:hover img {
  transform: scale(1.03);
}

.gallery-thumbs-list {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.gallery-thumb-item {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  flex-shrink: 0;
  transition: var(--transition);
}

.gallery-thumb-item.active,
.gallery-thumb-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

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

/* Product Info Header */
.product-meta-header {
  margin-bottom: 24px;
}

.product-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.product-breadcrumbs a {
  color: var(--text-muted);
}

.product-breadcrumbs a:hover {
  color: var(--primary);
}

.product-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.product-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fef9c3;
  color: #713f12;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.rating-stars {
  color: #ca8a04;
  display: inline-flex;
}

.product-short-desc {
  font-size: 1.05rem;
  color: #000000;
  line-height: 1.7;
  margin-bottom: 28px;
}

/* Quote Calculator Widget */
.quote-calculator-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* When embedded inside modal popup, eliminate nested container borders and excessive paddings */
.bp-modal-card .quote-calculator-box {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.quote-calculator-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.bp-modal-card .quote-calculator-header {
  padding-right: 42px; /* Prevent header content from touching the modal close button */
}

.quote-calculator-header h3 {
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  font-weight: 800;
  line-height: 1.25;
}

/* Product Base Type Selector Tabs */
.quote-type-nav-wrapper {
  margin-bottom: 16px;
  background: var(--bg-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-sizing: border-box;
}

.quote-type-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

@media (max-width: 580px) {
  .quote-type-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
}

.quote-type-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: 1.5px solid transparent;
  background: #ffffff;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  min-height: 42px;
  min-width: 0;
  box-sizing: border-box;
}

.quote-type-pill .pill-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.quote-type-pill .pill-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
}

@media (max-width: 580px) {
  .quote-type-pill {
    padding: 8px 10px;
    justify-content: center;
  }
  .quote-type-pill .pill-label {
    white-space: normal;
    font-size: 0.82rem;
  }
}

.quote-type-pill:hover {
  color: var(--primary);
  border-color: rgba(79, 1, 107, 0.3);
  transform: translateY(-1px);
}

.quote-type-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 1, 107, 0.25);
}

.quote-type-pill.active .pill-label {
  color: #ffffff;
}

/* Dynamic Fieldsets */
.product-custom-fields {
  animation: fadeInFieldset 0.25s ease-out;
}

@keyframes fadeInFieldset {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calculator-grid {
  display: grid;
  gap: 14px;
}

/* 3D & 2D Dimensions Rows */
.form-group-row-3d {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(75px, 0.9fr);
  gap: 8px;
}

.form-group-row-2d {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(75px, 0.9fr);
  gap: 8px;
}

@media (max-width: 480px) {
  .form-group-row-3d {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .form-group-row-2d {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .form-group-row-2d .quote-unit {
    grid-column: span 2;
  }
}

.quote-calculator-box .grid.grid-cols-2,
.bp-modal-card .grid.grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 540px) {
  .quote-calculator-box .grid.grid-cols-2,
  .bp-modal-card .grid.grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.form-field-label {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  display: block;
  line-height: 1.35;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #000000;
  font-size: 0.925rem;
  transition: var(--transition);
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* Prevents iOS auto-zoom on input focus */
  }
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 1, 107, 0.15);
}

/* Quantity Tiers */
.quantity-tiers {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

@media (max-width: 640px) {
  .quantity-tiers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
}

@media (max-width: 360px) {
  .quantity-tiers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
}

.qty-tier-btn {
  padding: 8px 4px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
}

.qty-tier-btn .qty-num {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.qty-tier-btn .qty-sub {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
  line-height: 1.2;
}

.qty-tier-btn .qty-sub.save {
  color: #059669;
  font-weight: 700;
}

.qty-tier-btn:hover {
  border-color: var(--primary);
  background: #fbf5ff;
}

.qty-tier-btn.active {
  border-color: var(--primary);
  background: #f8eeff;
  box-shadow: 0 0 0 2px rgba(79, 1, 107, 0.2);
}

.qty-tier-btn.active .qty-num {
  color: var(--primary);
}

/* Human Verification & Anti-Spam Security Card */
.bp-human-verify-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #faf5ff;
  border: 1.5px solid #e9d5ff;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 4px;
  margin-bottom: 4px;
  gap: 10px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

@media (max-width: 440px) {
  .bp-human-verify-card {
    flex-wrap: wrap;
  }
  .bp-human-verify-badge {
    margin-left: auto;
  }
}

.bp-human-verify-card:hover {
  border-color: var(--primary);
  background: #f8eeff;
}

.bp-human-verify-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  flex: 1;
  min-width: 0;
}

.bp-human-verify-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.bp-human-verify-box {
  width: 22px;
  height: 22px;
  background: #ffffff;
  border: 2px solid #a855f7;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.bp-human-verify-input:focus + .bp-human-verify-box {
  box-shadow: 0 0 0 3px rgba(79, 1, 107, 0.2);
}

.bp-human-verify-input:checked + .bp-human-verify-box {
  background: #059669;
  border-color: #059669;
}

.bp-human-verify-input:checked + .bp-human-verify-box::after {
  content: "✓";
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.bp-human-verify-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bp-human-verify-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

.bp-human-verify-sub {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
}

.bp-human-verify-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  opacity: 0.85;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 8px;
  flex-shrink: 0;
}

.quote-submit-btn {
  width: 100%;
  padding: 14px 18px;
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  font-weight: 800;
  background: var(--accent);
  color: #000000;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 10px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px 0 rgba(255, 220, 0, 0.45);
  min-height: 48px;
  box-sizing: border-box;
  text-align: center;
}

.quote-submit-btn:hover {
  background: var(--accent-hover);
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(255, 220, 0, 0.6);
}

.quote-calc-status {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* Product Content Tabs */
.product-tabs-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-top: 40px;
}

.tab-nav {
  display: flex;
  gap: 20px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 30px;
  overflow-x: auto;
}

.tab-btn {
  padding: 12px 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn.active,
.tab-btn:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  display: none;
  line-height: 1.8;
  color: #000000;
}

.tab-pane.active {
  display: block;
}

/* Product Grid Cards (Archive / Hubs) */
.product-grid-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-grid-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-lg);
}

.product-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
}

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

.product-grid-card:hover .product-card-media img {
  transform: scale(1.05);
}

.product-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card-category {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.product-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
}

.product-card-title a {
  color: var(--primary);
}

.product-card-title a:hover {
  color: var(--primary-light);
}

.product-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: #000000;
}

/* ---------------------------------------------------------------------------
   Archive supporting copy (category & post-type archives)
   --------------------------------------------------------------------------- */
.bp-archive-copy {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 56px 0 64px;
}

.bp-archive-copy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.bp-archive-copy-block h2 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0 0 10px;
  color: var(--primary, #4F016B);
  font-weight: 700;
}

.bp-archive-copy-block p {
  font-size: 0.94rem;
  line-height: 1.75;
  color: #334155;
  margin: 0;
}

@media (max-width: 900px) {
  .bp-archive-copy-grid { grid-template-columns: 1fr; gap: 26px; }
  .bp-archive-copy { padding: 40px 0 46px; }
}
