:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --text-main: #1e293b;
    --text-light: #64748b;
    --bg-body: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

body { background-color: var(--bg-body); font-family: "Outfit", "Inter", sans-serif; color: var(--text-main); }

/* Layout & Cards */
.product-grid-container {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Gallery */
.gallery-sticky { position: sticky; top: 20px; }
.main-image-box {
    aspect-ratio: 1/1;
    display: flex; align-items: center; justify-content: center;
    background: #fff; padding: 20px; border-bottom: 1px solid var(--border);
}
.main-image-box img { max-width: 100%; max-height: 100%; object-fit: contain; }

.thumb-scroll {
    display: flex; gap: 12px; padding: 15px; overflow-x: auto;
    scrollbar-width: none;
}
.thumb-scroll::-webkit-scrollbar { display: none; }
.thumb-btn {
    width: 70px; height: 70px; border-radius: 8px; border: 2px solid var(--border);
    cursor: pointer; overflow: hidden; flex-shrink: 0; opacity: 0.7; transition: 0.2s;
}
.thumb-btn.active { border-color: var(--primary); opacity: 1; transform: scale(1.05); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }

/* Product Info */
.info-section { padding: 32px; }
.product-cat { font-size: 0.85rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.product-name { font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 12px; color: #0f172a; }

.rating-badge { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.stars { color: #f59e0b; font-size: 0.9rem; }
.rev-count { font-size: 0.85rem; color: var(--text-light); }

.price-box { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.price-now { font-size: 2.25rem; font-weight: 800; color: var(--text-main); }
.price-old { font-size: 1.25rem; color: var(--text-light); text-decoration: line-through; }
.discount-tag { background: #fee2e2; color: #dc2626; padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; font-weight: 700; }

/* Trust Grid */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.trust-item { 
    text-align: center; padding: 12px; background: #f1f5f9; border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.trust-item i { font-size: 1.2rem; color: var(--primary); }
.trust-item span { font-size: 0.75rem; font-weight: 600; line-height: 1.2; }

/* CTAs */
.qty-input-group {
    display: flex; align-items: center; background: #f1f5f9; border-radius: 10px; padding: 4px;
}
.qty-btn { 
    width: 36px; height: 36px; border-radius: 8px; border: none; background: #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s;
}
.qty-btn:hover { background: var(--primary); color: #fff; }
.qty-val { width: 40px; text-align: center; border: none; background: transparent; font-weight: 700; }

.btn-buy { 
    background: #2563eb; color: #fff; border: none; padding: 16px 24px; border-radius: 10px;
    font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: 0.3s; width: 100%; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn-buy:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3); }

.btn-whatsapp-outline {
    border: 2px solid #25d366; color: #25d366; background: #fff; padding: 14px 24px; border-radius: 10px;
    font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; transition: 0.2s;
}
.btn-whatsapp-outline:hover { background: #25d366; color: #fff; }

/* Related Products */
.related-card { 
    background: #fff; border-radius: 12px; border: 1px solid var(--border); 
    overflow: hidden; transition: 0.3s; height: 100%; display: flex; flex-direction: column;
}
.related-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--primary); }
.related-img { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; padding: 15px; background: #fff; }
.related-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.related-body { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.related-title { font-weight: 700; color: var(--text-main); font-size: 0.9rem; margin-bottom: 8px; line-height: 1.3; }
.related-price { font-weight: 800; color: var(--primary); font-size: 1.1rem; }

/* Full Description Section */
.full-desc-card { background: white; border-radius: 12px; padding: 32px; border: 1px solid var(--border); margin-bottom: 30px; }
.section-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 20px; position: relative; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.section-title::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 60px; height: 3px; background: var(--primary); border-radius: 2px; }

.breadcrumb-area { padding: 12px 0; margin-bottom: 10px; font-size: 0.85rem; color: var(--text-light); }
.breadcrumb-area a { color: var(--text-light); text-decoration: none; }
.breadcrumb-area a:hover { color: var(--primary); }
.breadcrumb-area span { margin: 0 8px; opacity: 0.5; }

/* Load More Button Styles */
.load-more-container { text-align: center; margin: 40px 0; }
.btn-load-more {
    background: white; color: var(--primary); border: 2px solid var(--primary);
    padding: 10px 30px; border-radius: 50px; font-weight: 700; transition: 0.3s; cursor: pointer;
}
.btn-load-more:hover { background: var(--primary); color: white; }

/* Specification Table */
.spec-scroll-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.spec-scroll-container::-webkit-scrollbar { width: 4px; height: 4px; }
.spec-scroll-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.spec-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 10px; }
.spec-table tr td { padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 0.95rem; line-height: 1.4; }
.spec-table tr td:first-child { width: 45%; color: var(--text-light); font-weight: 500; background: #f8fafc; }
.spec-table tr td:last-child { color: var(--text-main); font-weight: 600; }
.spec-table tr:last-child td { border-bottom: none; }

/* Fix description tables */
.desc-content table {
    width: 100% !important;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin: 20px 0;
}
.desc-content table td, .desc-content table th {
    padding: 10px;
    border: 1px solid var(--border);
    min-width: 120px;
}

/* Responsive */
@media (max-width: 991px) {
    .product-grid-container { grid-template-columns: 1fr; gap: 24px; }
    .gallery-sticky { position: static; }
    .product-name { font-size: 1.75rem; }
    .info-section { padding: 24px; }
}

@media (max-width: 768px) {
    body { padding-bottom: 80px; }
    .price-now { font-size: 1.8rem; }
    .trust-grid { grid-template-columns: 1fr; }
    .trust-item { flex-direction: row; text-align: left; padding: 15px; }
}

/* Vendor Section Upgrade */
.vendor-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.vendor-info-badge {
    background: #f8fafc; border: 1px solid var(--border); padding: 16px; border-radius: 12px;
    display: flex; flex-direction: column; gap: 4px; transition: 0.2s;
}
.vendor-info-badge:hover { background: #fff; border-color: var(--primary); box-shadow: var(--shadow); }
.vendor-info-badge .label { font-size: 0.75rem; font-weight: 600; color: var(--text-light); text-uppercase: uppercase; letter-spacing: 0.5px; }
.vendor-info-badge .value { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }

.btn-profile {
    background: var(--primary); color: #fff; border: none; padding: 12px 24px; border-radius: 10px;
    font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: 0.3s;
}
.btn-profile:hover { background: var(--primary-dark); transform: translateX(5px); color: #fff; }

/* Mobile Bottom Bar Upgrade */
.sticky-atc {
    position: fixed; bottom: 0; left: 0; width: 100%; background: #fff;
    padding: 10px 16px; display: flex; align-items: center; gap: 12px; z-index: 1000;
    box-shadow: 0 -8px 20px rgba(0,0,0,0.1); border-top: 1px solid var(--border);
}
.sticky-atc .btn-whatsapp-outline {
    width: 54px; height: 54px; flex-shrink: 0; padding: 0; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.sticky-atc .btn-buy {
    height: 54px; font-size: 1rem; margin: 0;
}

/* Review Section Upgrade */
.review-summary-wrapper {
    display: flex;
    gap: 32px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 20px;
    margin-bottom: 35px;
    border: 1px solid var(--border);
}

.rating-avg-box {
    text-align: center;
    padding-right: 32px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 160px;
}

.rating-huge { font-size: 4rem; font-weight: 800; color: var(--text-main); line-height: 1; margin-bottom: 5px; }
.stars-large { color: #f59e0b; font-size: 1.1rem; margin: 10px 0; display: flex; justify-content: center; gap: 4px; }

.rating-bars { flex-grow: 1; }
.rating-bar-item { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
.bar-label { font-size: 0.85rem; font-weight: 700; width: 60px; color: var(--text-light); }
.bar-container { flex-grow: 1; height: 8px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: #f59e0b; border-radius: 10px; transition: width 0.6s cubic-bezier(0.1, 0, 0.2, 1); }
.bar-count { font-size: 0.85rem; font-weight: 600; color: var(--text-light); width: 35px; text-align: right; }

.reviews-container { display: flex; flex-direction: column; gap: 20px; }
.review-card {
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--border);
    transition: 0.3s;
}
.review-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.reviewer-info { display: flex; align-items: center; gap: 15px; }
.avatar-ui {
    width: 48px; height: 48px; border-radius: 12px; background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; color: var(--primary); font-size: 1.2rem;
    border: 1px solid #e2e8f0;
}
.reviewer-details .name { font-weight: 700; color: var(--text-main); font-size: 1rem; display: block; }
.reviewer-details .date { font-size: 0.8rem; color: var(--text-light); }

.verified-purchase { font-size: 0.7rem; color: #059669; font-weight: 800; display: flex; align-items: center; gap: 4px; background: #ecfdf5; padding: 4px 10px; border-radius: 100px; }

.rating-mini { color: #f59e0b; font-size: 0.8rem; margin-bottom: 8px; display: flex; gap: 2px; }
.review-text-ui { color: #475569; line-height: 1.6; font-size: 0.95rem; }

/* Modern Rating Form */
.rating-form {
    background: #fff; padding: 35px; border-radius: 24px;
    border: 1px solid var(--border); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: sticky; top: 100px;
}
.form-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 25px; color: #0f172a; text-align: center; }

.star-rating-v2 { display: flex; flex-direction: row-reverse; justify-content: center; gap: 12px; margin: 25px 0; }
.star-rating-v2 input { display: none; }
.star-rating-v2 label { font-size: 2.25rem; color: #e2e8f0; cursor: pointer; transition: 0.2s; }
.star-rating-v2 label:hover, .star-rating-v2 label:hover ~ label, .star-rating-v2 input:checked ~ label { color: #f59e0b; transform: scale(1.15); }

@media (max-width: 991px) {
    .review-summary-wrapper { flex-direction: column; gap: 25px; padding: 20px; }
    .rating-avg-box { border-right: none; border-bottom: 1px solid #e2e8f0; padding-right: 0; padding-bottom: 25px; min-width: 100%; }
    .rating-form { position: static; margin-top: 30px; padding: 25px; }
}

/* FAQ Section Upgrade */
.faq-wrapper {
    margin-top: 30px;
}

.faq-header {
    text-align: center;
    margin-bottom: 30px;
}

.faq-subtitle {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.faq-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-main);
    user-select: none;
}

.faq-question i {
    font-size: 0.9rem;
    transition: 0.3s;
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background: #f8fafc;
    padding: 0 24px;
    color: #475569;
    line-height: 1.6;
    font-size: 0.95rem;
}

.faq-item.active {
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.05);
}

.faq-item.active .faq-question {
    color: var(--primary);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 20px;
    padding-top: 10px;
}

/* Seller Card Upgrade */
.seller-info-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}
.seller-header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 15px;
}
.seller-logo {
    width: 80px;
    height: 80px;
    border: 1px solid #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: #fff;
}
.seller-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.seller-name-area {
    flex-grow: 1;
}
.seller-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #008080;
    margin-bottom: 4px;
    display: block;
    text-decoration: none;
}
.seller-name:hover { color: #006666; }
.seller-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}
.seller-rating i {
    color: #ffc107;
    font-size: 0.9rem;
}
.trusted-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}
.trusted-badge img {
    width: 24px;
}

.seller-details {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #555;
}
.seller-detail-item {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.seller-detail-item i {
    color: #7c88a1;
    width: 16px;
    margin-top: 3px;
}
.seller-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.85rem;
}
.seller-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.seller-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}
.btn-seller-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: 0.3s;
    text-decoration: none;
}
.btn-view-number {
    background: #f8fafc;
    border: 1px solid #008080;
    color: #008080;
}
.btn-view-number:hover {
    background: #008080;
    color: #fff;
}
.btn-contact-supplier {
    background: #008080;
    border: 1px solid #008080;
    color: #fff;
}
.btn-contact-supplier:hover {
    background: #006666;
    border-color: #006666;
}
.company-video-link {
    color: #007bff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-top: 10px;
}
.company-video-link:hover { text-decoration: underline; }
.company-video-link i { color: #ff0000; }

/* Product Tabs */
.product-tabs-container {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
    overflow: hidden;
}
.tabs-header {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}
.tab-btn {
    padding: 15px 30px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: 0.3s;
}
.tab-btn.active {
    color: var(--primary);
}
.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}
.tab-content {
    padding: 32px;
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
    .tab-btn { padding: 12px 20px; font-size: 0.9rem; flex-grow: 1; text-align: center; }
}
