/* === CSS Variables === */
:root {
    --primary: #1A237E;
    --secondary: #FB6D00;
    --text-dark: #14213B;
    --text-main: #1B1B21;
    --text-light: #757575;
    --text-muted: #767683;
    --bg-light: #F5F2FB;
    --bg-white: #FBF8FF;
    --border-color: #C6C5D4;
    --border-light: #E4E1EA;
    --success: #4CAF50;
    --price-color: #9E4200;
    --primary-text: #000666;
    --transition: 0.3s ease;
}

/* === Buttons === */
.btn { padding: 8px 24px; border-radius: 8px; font-family: 'Cairo'; font-weight: 500; font-size: 16px; cursor: pointer; transition: var(--transition); border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background-color: var(--secondary); color: white; border-color: var(--secondary); }
.btn-primary:hover { background-color: #e65100; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background-color: var(--primary); color: white; }
.btn-outline-block { width: 100%; background: transparent; color: var(--primary); border-color: var(--primary); padding: 10px; border-radius: 8px; font-family: 'Cairo'; font-weight: 700; cursor: pointer; transition: var(--transition); text-align: center; }
.btn-outline-block:hover { background-color: var(--primary); color: white; }
.btn-outline-icon { background: transparent; color: var(--text-main); border-color: var(--text-muted); padding: 10px 20px; }
.btn-outline-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { font-size: 12px; padding: 4px 12px; }

/* Wishlisted state - Red Heart */
.btn-outline-icon.wishlisted-btn {
    background: #E53935 !important;
    border-color: #E53935 !important;
    color: #fff !important;
}
.btn-outline-icon.wishlisted-btn i {
    color: #fff !important;
}
.btn-outline-icon.wishlisted-btn:hover {
    background: #C62828 !important;
    border-color: #C62828 !important;
}

/* === Breadcrumbs === */
.breadcrumbs-bar { padding: 16px 0; background: var(--bg-light); border-bottom: 1px solid var(--border-light); }
.breadcrumb-list { display: flex; align-items: center; gap: 8px; list-style: none; font-size: 14px; color: var(--text-light); }
.breadcrumb-list li a { color: var(--primary); text-decoration: none; }
.breadcrumb-list li a:hover { text-decoration: underline; }
.breadcrumb-list li.active { color: var(--text-dark); font-weight: 600; }
.breadcrumb-list li i { font-size: 10px; color: var(--text-light); }

/* === Product Detail Grid === */
.product-detail-main { padding: 40px 0; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }

/* === Product Gallery (Left) === */
.product-gallery { display: flex; flex-direction: column; gap: 16px; }
.main-image-container { background: white; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); overflow: hidden; height: 450px; position: relative; }
.main-image-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.main-image-container:hover img { transform: scale(1.02); }

/* Discount badge on main image */
.discount-badge-main {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #E53935;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 800;
    z-index: 5;
    pointer-events: none;
}
html[dir="ltr"] .discount-badge-main { right: auto; left: 16px; }

/* === Cost Calculator === */
.cost-calculator { background: var(--primary); border-radius: 12px; padding: 24px; color: #fff; }
.cost-calculator h4 { font-weight: 700; margin-bottom: 12px; font-size: 18px; }
.calculator-body { background: rgba(255,255,255,0.15); border-radius: 8px; padding: 16px; }
.calculator-body label { font-size: 13px; opacity: 0.9; display: block; margin-bottom: 6px; }
.calculator-body input { width: 100%; padding: 10px 12px; border-radius: 6px; border: none; font-size: 16px; font-weight: 700; font-family: 'Cairo'; }
.calculator-result { text-align: center; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.2); margin-top: 12px; }
.result-label { font-size: 12px; opacity: 0.8; }
.result-value { font-size: 28px; font-weight: 800; margin-top: 4px; }
.result-unit { font-size: 13px; opacity: 0.8; margin-top: 4px; }

/* === Contact Seller Card === */
.contact-seller-card { background: #fff; border: 1px solid var(--border-light); border-radius: 12px; padding: 24px; }
.contact-seller-card h3 { margin-bottom: 16px; font-size: 18px; color: var(--primary); }
.contact-list-details { list-style: none; margin-bottom: 16px; }
.contact-list-details li { display: flex; gap: 12px; margin-bottom: 12px; font-size: 14px; align-items: center; }
.contact-list-details li i { color: var(--primary); width: 18px; text-align: center; flex-shrink: 0; }
.contact-list-details li a { color: var(--text-main); text-decoration: none; }
.contact-list-details li a:hover { color: var(--primary); }

/* === Product Info (Right) === */
.product-info-section { min-width: 0; }
.product-meta-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ref-number { color: var(--primary-text); font-weight: 700; font-size: 14px; }
.badge.verified { background: var(--success); color: white; padding: 4px 12px; border-radius: 20px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.product-title { font-size: 32px; color: var(--text-dark); line-height: 1.3; margin-bottom: 16px; font-weight: 700; }
.product-category-company { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; font-size: 16px; flex-wrap: wrap; }
.category { color: var(--text-light); }
.dot { width: 4px; height: 4px; background: var(--border-color); border-radius: 50%; }
.company-link { color: var(--primary); font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.company-link:hover { text-decoration: underline; }

/* === Pricing Card === */
.pricing-card { background: var(--bg-light); border: 1px solid var(--border-light); border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.pricing-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 16px; }
.price-tier { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: white; border: 1px solid var(--border-light); border-radius: 8px; margin-bottom: 8px; transition: var(--transition); }
.price-tier.featured { border: 2px solid var(--primary); background: #fff; box-shadow: 0 2px 8px rgba(26,35,126,0.1); }
.price-amount .price { font-size: 20px; font-weight: 700; color: var(--primary-text); display: block; }
.price-amount .label { font-size: 12px; color: var(--text-light); }
.price-range { text-align: end; }
.range-text { font-size: 14px; font-weight: 600; color: var(--text-main); display: block; }
.discount-badge { display: inline-block; font-size: 12px; font-weight: 700; color: #D32F2F; background: #FFEBEE; padding: 2px 8px; border-radius: 4px; margin-top: 4px; }

.moq-section { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 14px; background: #fff; padding: 12px; border-radius: 8px; border: 1px solid var(--border-light); }
.moq-icon { color: var(--success); font-size: 18px; }
.moq-section p { margin: 0; }

.action-buttons { display: flex; flex-direction: column; gap: 12px; }
.btn-contact { width: 100%; justify-content: center; font-size: 18px; padding: 16px; font-weight: 700; }
.secondary-actions { display: flex; gap: 12px; }
.secondary-actions .btn-outline-icon { flex: 1; justify-content: center; }

/* === Info Card (Description, Seller) === */
.info-card { background: #fff; border: 1px solid var(--border-light); border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.info-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 16px; }
.description-text { color: var(--text-light); line-height: 1.8; font-size: 15px; }

/* === Specs Table === */
.specs-card { background: #fff; border: 1px solid var(--border-light); border-radius: 12px; overflow: hidden; margin-bottom: 24px; }
.specs-header { background: var(--bg-light); padding: 12px 24px; border-bottom: 1px solid var(--border-light); }
.specs-header h3 { font-size: 16px; color: var(--primary); font-weight: 600; }
.spec-row { display: flex; border-bottom: 1px solid var(--border-light); }
.spec-row:last-child { border-bottom: none; }
.spec-label { width: 35%; padding: 12px 16px; font-weight: 600; font-size: 14px; color: var(--text-main); background: white; border-left: 1px solid var(--border-light); }
html[dir="ltr"] .spec-label { border-left: none; border-right: 1px solid var(--border-light); }
.spec-value { width: 65%; padding: 12px 16px; font-size: 14px; color: var(--text-light); }
.spec-value a { color: var(--primary); text-decoration: none; font-weight: 600; }
.spec-value a:hover { text-decoration: underline; }

/* === Special Offer Card === */
.special-offer-card { background: linear-gradient(135deg, #E53935, #FF6F00); border-radius: 12px; padding: 24px; color: #fff; text-align: center; margin-bottom: 24px; }
.offer-discount { font-size: 36px; font-weight: 800; }
.offer-label { font-size: 16px; margin-top: 4px; }
.offer-ends { font-size: 13px; margin-top: 8px; opacity: 0.9; }
.offer-prices { margin-top: 12px; font-size: 16px; }
.old-price { text-decoration: line-through; opacity: 0.8; }
.new-price { font-size: 24px; font-weight: 800; margin-inline-start: 8px; }

/* === Related Sections === */
.related-section { padding: 64px 0; }
.bg-light { background-color: var(--bg-light); }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; border-bottom: 2px solid #E5EEFF; padding-bottom: 16px; }
.section-text h2 { font-size: 24px; color: var(--primary-text); }
.section-text p { color: var(--text-light); }
.view-all { color: var(--primary-text); font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.view-all:hover { text-decoration: underline; }

/* Product Cards (Related) */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.product-card { background: white; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-light); transition: var(--transition); }
.product-card:hover { box-shadow: 0 8px 16px rgba(0,0,0,0.08); }
.product-img { height: 220px; position: relative; background: #eee; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 16px; }
.product-info h3 { font-size: 16px; margin-bottom: 4px; height: 48px; overflow: hidden; }
.product-info h3 a { color: inherit; text-decoration: none; }
.company-name { font-size: 14px; color: var(--text-light); margin-bottom: 12px; }
.product-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--border-color); padding-top: 12px; }
.price { font-size: 16px; font-weight: 700; color: var(--primary-text); }

/* === Mobile Responsiveness === */
@media (max-width: 992px) {
    .product-detail-grid { grid-template-columns: 1fr; }
    .product-gallery { order: -1; }
    .main-image-container { height: 350px; }
}

@media (max-width: 768px) {
    .product-title { font-size: 22px; }
    .main-image-container { height: 280px; }
    .secondary-actions { flex-direction: column; gap: 8px; }
    .btn-contact { font-size: 16px; padding: 14px; }
    .pricing-card { padding: 16px; }
    .price-tier { flex-direction: column; gap: 8px; align-items: flex-start; }
    .price-range { text-align: start; }
    .product-category-company { flex-direction: column; align-items: flex-start; gap: 8px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
    .info-card { padding: 16px; }
    .cost-calculator { padding: 16px; }
    .result-value { font-size: 22px; }
    .special-offer-card { padding: 16px; }
    .offer-discount { font-size: 28px; }
    .offer-prices .new-price { font-size: 20px; }
}

@media (max-width: 480px) {
    .breadcrumb-list { font-size: 12px; gap: 4px; }
    .product-title { font-size: 20px; }
    .main-image-container { height: 220px; }
    .btn-contact { font-size: 14px; padding: 12px; }
    .action-buttons { gap: 8px; }
    .secondary-actions .btn-outline-icon { padding: 8px 12px; font-size: 13px; }
    .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product-img { height: 140px; }
    .product-info h3 { font-size: 13px; height: 36px; }
    .product-info { padding: 10px; }
    .company-name { font-size: 12px; }
    .product-meta { font-size: 12px; padding-top: 8px; }
}
