/* Enhanced Single Product Page - Ceyspace Style */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.b2b-single-product-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8f9fa;
    padding: 30px 0 60px;
}

.b2b-product-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.b2b-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 25px;
}

.b2b-breadcrumb a {
    color: #2c5f87;
    text-decoration: none;
}

.b2b-breadcrumb a:hover {
    text-decoration: underline;
}

/* Main Grid */
.b2b-product-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
}

/* Image Gallery */
.b2b-product-gallery-section {
    align-self: flex-start;
}

.b2b-main-product-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f7fafc;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
}

.b2b-main-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;           /* ✅ Show full product, no crop */
    background: #f7fafc;
}

.b2b-thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.b2b-thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f7fafc;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.b2b-thumb:hover,
.b2b-thumb.active {
    border-color: #2c5f87;
}

.b2b-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;           /* match main image style */
    background: #f7fafc;
    padding: 4px;
    box-sizing: border-box;
}

/* Product Info Section */
.b2b-product-info-section {}

.b2b-product-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px;
    line-height: 1.3;
}

.b2b-product-header-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.b2b-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.b2b-tag-verified {
    background: #3b82f6;
    color: white;
}

.b2b-tag-srilanka {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Rating Display */
.b2b-product-rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.b2b-stars-large {
    display: flex;
    gap: 3px;
    color: #fbbf24;
    font-size: 1.1rem;
}

.b2b-stars-large .far {
    color: #e5e7eb;
}

.b2b-rating-text {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.b2b-review-link {
    font-size: 0.9rem;
    color: #2c5f87;
    cursor: pointer;
}

.b2b-review-link:hover {
    text-decoration: underline;
}

/* MOQ Heading */
.b2b-moq-heading {
    font-size: 0.95rem;
    color: #2c5f87;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

/* Price Tiers Grid (Demo Style) */
.b2b-price-tiers-grid {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.b2b-price-tier-item {
    padding: 0;
}

.b2b-tier-qty {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 5px;
}

.b2b-tier-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1f2937;
}

/* Action Buttons */
.b2b-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.b2b-btn-inquiry,
.b2b-btn-chat,
.b2b-btn-whatsapp {
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.b2b-btn-inquiry {
    background: linear-gradient(135deg, #2c5f87 0%, #4a7ba7 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(44, 95, 135, 0.3);
}

.b2b-btn-inquiry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 95, 135, 0.4);
}

.b2b-btn-chat {
    background: white;
    color: #2c5f87;
    border: 2px solid #2c5f87;
}

.b2b-btn-chat:hover {
    background: #2c5f87;
    color: white;
}

.b2b-btn-whatsapp {
    background: #25d366 !important;
    color: white !important;
    border: 2px solid #25d366 !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.b2b-btn-whatsapp:hover {
    background: #128c7e !important;
    border-color: #128c7e !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Gate button for non-buyers — same green style as real WhatsApp link */
button.b2b-whatsapp-gate,
button.b2b-whatsapp-gate:link,
button.b2b-whatsapp-gate:visited {
    background: #25d366 !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3) !important;
    outline: none !important;
}
button.b2b-whatsapp-gate:hover {
    background: #128c7e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4) !important;
    color: white !important;
}

/* Supplier Mini Card */
.b2b-supplier-mini-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

.b2b-supplier-mini-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.b2b-supplier-mini-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.b2b-supplier-mini-header h4 {
    margin: 0 0 5px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.b2b-verified-text {
    font-size: 0.8rem;
    color: #059669;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.b2b-view-profile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #2c5f87;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    transition: all 0.3s;
}

.b2b-view-profile-link:hover {
    background: #2c5f87;
    color: white;
}

/* Description Section */
.b2b-product-description-section {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
}

.b2b-product-description-section h2 {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #374151;
    text-transform: uppercase;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.b2b-description-content {
    color: #4b5563;
    line-height: 1.8;
    font-size: 0.95rem;
}

.b2b-description-content p {
    margin-bottom: 15px;
}

/* Recommended Products Section */
.b2b-recommended-section {
    margin-bottom: 40px;
}

.b2b-recommended-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 25px;
}

.b2b-recommended-section .highlight {
    background: linear-gradient(135deg, #0051a8 0%, #249cff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.b2b-recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

/* Responsive */
@media (max-width: 968px) {
    .b2b-product-main-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px;
    }

    .b2b-product-gallery-section {
        position: relative;
        top: 0;
    }

    .b2b-action-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .b2b-product-header h1 {
        font-size: 1.3rem;
    }

    .b2b-thumbnail-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .b2b-price-value {
        font-size: 1.1rem;
    }

    .b2b-recommended-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .b2b-product-wrapper {
        padding: 0 15px;
    }

    .b2b-product-description-section,
    .b2b-product-main-grid {
        padding: 20px;
    }
}


.b2b-price-tiers-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:22px 40px;
  padding:18px 18px 6px;
  border:1px solid rgba(15,23,42,0.08);
  border-radius:14px;
  background:#fff;
}

.b2b-price-tier-item{
  padding-bottom:10px;
}

.b2b-tier-qty{
  font-size:13px;
  color:#64748b;
  font-weight:700;
  margin-bottom:6px;
}

.b2b-tier-price{
  font-size:20px;
  font-weight:900;
  color:#0f172a;
}

@media (max-width: 520px){
  .b2b-price-tiers-grid{
    grid-template-columns: 1fr;
  }
}



/* Single product - image badges row (under title) */
.b2b-product-header-badges{
  display:flex;
  gap:10px;
  margin-top:8px;
  flex-wrap:wrap;
}

.b2b-sp-badge-img{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  background:none;
  border:none;
  box-shadow:none;
}

.b2b-sp-badge-img img{
  height:22px;
  width:auto;
  display:block;
  max-width:160px;
  object-fit:contain;
}

/* Made in SL badge */
.b2b-sp-badge-sl img{
  height:20px;
}

/* ------------------------------------------------------------
   ✅ Product Reviews Section (Advanced UI)
------------------------------------------------------------ */

.b2b-product-reviews-section{
  margin-top: 28px;
  margin-bottom: 48px;
  background:#fff;
  border:1px solid rgba(15,23,42,0.08);
  border-radius:18px;
  box-shadow:0 10px 28px rgba(2,6,23,0.06);
  padding:18px;
}

.b2b-product-reviews-section h2{
  margin:0 0 14px;
  font-size:20px;
  font-weight:800;
}

#b2bProductReviews.is-loading{ opacity:0.6; pointer-events:none; }

.b2b-review-summary{
  display:grid;
  grid-template-columns: 160px 1fr 180px;
  gap:16px;
  align-items:center;
  padding:14px;
  border:1px solid rgba(15,23,42,0.08);
  border-radius:14px;
  background:#f8fafc;
}

.b2b-review-avg{ font-size:38px; font-weight:900; line-height:1; }
.b2b-review-avg-label{ font-size:13px; font-weight:700; opacity:0.85; margin-top:4px; }
.b2b-review-count{ font-size:12px; opacity:0.75; margin-top:4px; }

.b2b-review-summary-bars{ display:flex; flex-direction:column; gap:8px; }
.b2b-review-bar-row{ display:grid; grid-template-columns: 64px 1fr 28px; gap:10px; align-items:center; }
.b2b-review-star-label{ font-size:12px; font-weight:700; opacity:0.8; }
.b2b-review-star-count{ font-size:12px; opacity:0.75; text-align:right; }
.b2b-review-bar{ height:8px; background:#e5e7eb; border-radius:999px; overflow:hidden; }
.b2b-review-bar span{ display:block; height:100%; background:#f59e0b; border-radius:999px; }

.b2b-review-summary-cta{ display:flex; justify-content:flex-end; }
.b2b-review-summary-cta .b2b-btn{
  background:#0051a8;
  color:#fff;
  border:0;
  padding:10px 14px;
  border-radius:12px;
  font-weight:800;
  cursor:pointer;
}

.b2b-review-form-wrap{ margin-top:14px; padding:14px; border:1px solid rgba(15,23,42,0.08); border-radius:14px; }
.b2b-review-login-msg{ font-size:13px; opacity:0.85; }

.b2b-review-rate label{ font-weight:800; font-size:13px; display:block; margin-bottom:6px; }
.b2b-review-stars-input{ display:flex; gap:6px; font-size:18px; cursor:pointer; }
.b2b-review-stars-input i{ color:#f59e0b; }

.b2b-review-title-input,
.b2b-review-textarea{
  width:100%;
  border:1px solid rgba(15,23,42,0.12);
  border-radius:12px;
  padding:10px 12px;
  margin-top:12px;
  font-size:14px;
  font-family:inherit;
}

.b2b-review-upload{ display:flex; justify-content:flex-end; margin-top:10px; }
.b2b-upload-btn{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:8px 12px;
  border:1px solid rgba(15,23,42,0.12);
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
}
.b2b-upload-btn input{ display:none; }

.b2b-review-submit{
  width:100%;
  margin-top:12px;
  background:#0051a8;
  color:#fff;
  border:0;
  padding:12px 14px;
  border-radius:12px;
  font-weight:900;
  cursor:pointer;
}
.b2b-review-msg{ margin-top:10px; font-size:13px; opacity:0.85; }

.b2b-review-list{ margin-top:16px; display:flex; flex-direction:column; gap:12px; }
.b2b-review-item{ padding:14px; border:1px solid rgba(15,23,42,0.08); border-radius:14px; background:#fff; }
.b2b-review-user{ display:flex; gap:10px; align-items:center; }
.b2b-review-avatar{ width:44px; height:44px; border-radius:999px; object-fit:cover; border:1px solid rgba(15,23,42,0.08); }
.b2b-review-name{ font-weight:900; font-size:14px; }
.b2b-review-meta{ display:flex; gap:10px; align-items:center; font-size:12px; opacity:0.85; margin-top:2px; }
.b2b-review-meta i{ color:#f59e0b; }
.b2b-review-date{ opacity:0.7; }
.b2b-review-title{ margin-top:10px; font-weight:900; }
.b2b-review-text{ margin-top:6px; font-size:14px; line-height:1.5; }

.b2b-review-images{ margin-top:10px; display:flex; gap:10px; flex-wrap:wrap; }
.b2b-review-images img{ width:64px; height:64px; object-fit:cover; border-radius:12px; border:1px solid rgba(15,23,42,0.08); }

.b2b-review-replies{ margin-top:12px; }
.b2b-review-reply{ background:#f8fafc; border:1px solid rgba(15,23,42,0.08); border-radius:12px; padding:10px 12px; }
.b2b-review-reply-tag{ font-weight:900; font-size:12px; margin-bottom:6px; }
.b2b-review-reply-text{ font-size:13px; line-height:1.45; }

.b2b-review-reply-form{ margin-top:10px; display:flex; gap:10px; align-items:flex-start; }
.b2b-review-reply-form textarea{ flex:1; border:1px solid rgba(15,23,42,0.12); border-radius:12px; padding:10px 12px; font-family:inherit; }
.b2b-review-reply-form .b2b-btn{ background:#111827; color:#fff; border:0; padding:10px 12px; border-radius:12px; font-weight:800; cursor:pointer; }
.b2b-reply-note{ font-size:12px; opacity:0.7; margin-top:4px; }

@media (max-width: 900px){
  .b2b-review-summary{ grid-template-columns: 1fr; }
  .b2b-review-summary-cta{ justify-content:flex-start; }
  .b2b-review-bar-row{ grid-template-columns: 60px 1fr 28px; }
}

/* ------------------------------------------------------------------
   Inquiry Modal (Single Product)
------------------------------------------------------------------- */
.b2b-inquiry-modal{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 18px;
}
.b2b-inquiry-modal.b2b-inquiry-open{ display:flex; }

.b2b-inquiry-dialog{
  width: min(860px, 100%);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(2,6,23,0.25);
  overflow: hidden;
}

.b2b-inquiry-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.b2b-inquiry-title{
  font-size: 22px;
  font-weight: 900;
  margin: 0;
  color: #0f172a;
}
.b2b-inquiry-close{
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: #0f172a;
}

.b2b-inquiry-body{ padding: 18px 22px 22px; }

.b2b-inquiry-label{ font-weight: 800; font-size: 14px; color:#0f172a; margin-bottom:8px; display:block; }
.b2b-inquiry-input, .b2b-inquiry-textarea, .b2b-inquiry-select{
  width: 100%;
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 10px;
  padding: 12px 12px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.b2b-inquiry-input:focus, .b2b-inquiry-textarea:focus, .b2b-inquiry-select:focus{
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}

.b2b-inquiry-row{ display:grid; grid-template-columns: 1fr; gap: 14px; }
.b2b-inquiry-row.two{ grid-template-columns: 1fr 220px; }
.b2b-inquiry-qty{ display:grid; grid-template-columns: 160px 1fr; gap: 12px; }

.b2b-inquiry-textarea{ min-height: 140px; resize: vertical; }

.b2b-inquiry-footer{ margin-top: 16px; }
.b2b-inquiry-btn{
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  background: #0b4aa2;
  color: #fff;
}
.b2b-inquiry-status{ margin-top: 10px; font-size: 13px; }
.b2b-inquiry-status.is-error{ color: #b91c1c; }
.b2b-inquiry-status.is-success{ color: #047857; }

@media (max-width: 700px){
  .b2b-inquiry-row.two{ grid-template-columns: 1fr; }
  .b2b-inquiry-qty{ grid-template-columns: 1fr; }
}