﻿/* --- Product Detail Page Styles --- */

.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin: 30px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--text-main); }
.breadcrumb .current { color: var(--text-main); font-weight: 500; }

.product-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-bottom: 60px; }

.gallery-container { display: flex; flex-direction: column; gap: 15px; }
.main-image {
    background: var(--bg-card-alt); border-radius: var(--radius); padding: 40px; position: relative;
    display: flex; justify-content: center; align-items: center; height: 500px;
    box-shadow: var(--shadow);
}
.main-image img { max-height: 100%; max-width: 100%; object-fit: contain; filter: drop-shadow(0 15px 25px rgba(0,0,0,0.6)); transition: opacity 0.3s ease; }
.badges-col { position: absolute; top: 20px; left: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.badge { font-size: 0.75rem; padding: 4px 12px; border-radius: 20px; font-weight: 700; width: fit-content; }
.badge.blue { background: var(--badge-blue, #0052cc); color: #fff; }
.badge.yellow { background: var(--primary); color: #000; }

.thumb-list { display: flex; gap: 12px; flex-wrap: wrap; }
.thumbnail {
    width: 80px; height: 80px; background: var(--bg-card-alt); border-radius: var(--radius-sm);
    display: flex; justify-content: center; align-items: center; padding: 6px; cursor: pointer;
    border: 2px solid transparent; transition: var(--transition); overflow: hidden;
}
.thumbnail img { max-width: 100%; max-height: 100%; object-fit: contain; opacity: 0.7; transition: opacity 0.3s; }
.thumbnail:hover img { opacity: 1; }
.thumbnail.active { border-color: var(--primary); }
.thumbnail.active img { opacity: 1; }
.gallery-label { font-size: 0.7rem; color: var(--text-muted); text-align: center; margin-top: 4px; }

.product-info { display: flex; flex-direction: column; }
.product-info h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 5px; line-height: 1.15; color: var(--text-main); }
.product-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 15px; }
.product-rating { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; margin-bottom: 25px; }
.product-rating strong { color: var(--primary); }
.product-rating .stars i { margin-right: 2px; color: #f1c40f; }

.price-box {
    background: var(--bg-card-alt); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px 25px; margin-bottom: 25px; box-shadow: var(--shadow);
}
.price-current { font-size: 2rem; font-weight: 800; color: var(--primary); display: inline-block; }
.stock-status { display: block; font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; font-weight: 500; }

/* Color Variants */
.color-selector { margin: 20px 0; }
.color-selector-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; font-weight: 600; }
.color-swatches { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.color-swatch {
    width: 40px; height: 40px; border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer; transition: all 0.2s;
    display: inline-flex; align-items: center; justify-content: center;
    position: relative;
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--primary); }
.color-name { font-size: 0.85rem; color: var(--text-muted); margin-top: 12px; }
.color-name strong { color: #fff; }

/* Variant Thumbs */
.variant-row { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.variant-row-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.variant-thumbs { display: flex; gap: 10px; }
.variant-thumb {
    width: 50px; height: 50px; border-radius: 8px; overflow: hidden;
    cursor: pointer; border: 2px solid transparent; transition: all 0.2s;
}
.variant-thumb:hover { border-color: var(--text-muted); }
.variant-thumb.active { border-color: var(--primary); }
.variant-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Action Buttons */
.action-buttons { display: flex; gap: 15px; margin-top: 25px; }
.btn-cart, .btn-buy {
    flex: 1; padding: 16px 20px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.95rem;
    display: flex; justify-content: center; align-items: center; gap: 10px; border: none; cursor: pointer;
}
.btn-cart { background: var(--primary); color: #000; }
.btn-cart:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-cart:disabled { background: #555; cursor: not-allowed; transform: none; }
.btn-buy { background: var(--btn-blue, #0f62fe); color: #fff; }
.btn-buy:hover { background: var(--btn-blue-hover, #0353e9); transform: translateY(-2px); }

.wishlist-btn {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
    border: 1px solid rgba(255, 77, 77, 0.3);
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    justify-content: center;
}
.wishlist-btn:hover { background: rgba(255, 77, 77, 0.2); border-color: #ff4d4d; }

/* Perks / Features */
.product-features { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 25px; margin-top: 30px; }
.feature-item { text-align: center; color: var(--text-muted); font-size: 0.8rem; flex: 1; }
.feature-item i { font-size: 1.3rem; color: var(--primary); margin-bottom: 6px; display: block; }

/* Tabs */
.tabs-section { margin-bottom: 60px; border-top: 1px solid var(--border); padding-top: 30px; }
.tab-headers { display: flex; gap: 30px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.tab-btn {
    background: none; border: none; color: var(--text-muted); font-size: 1rem; font-weight: 600;
    padding-bottom: 15px; position: relative; transition: color 0.3s; cursor: pointer;
}
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { color: var(--primary); }
.tab-btn.active::after {
    content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--primary);
}
.tab-content { display: none; color: var(--text-muted); line-height: 1.8; max-width: 800px; font-size: 0.95rem; }
.tab-content.active { display: block; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Reviews */
.review-item { margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.review-header strong { font-size: 1rem; color: var(--text-main); }
.review-date { font-size: 0.8rem; color: var(--text-muted); }
.review-stars { color: #f1c40f; font-size: 0.85rem; margin-bottom: 8px; }
.review-text { color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Empty States */
.empty-state { text-align: center; padding: 40px; }
.empty-state i { font-size: 3rem; color: #555; margin-bottom: 15px; display: block; }
.empty-state p { color: var(--text-muted); }

/* Related Products */
.related-products { margin-bottom: 60px; }
.related-products h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 30px; color: var(--text-main); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card {
    background: var(--bg-card-alt); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; display: flex; flex-direction: column; transition: all 0.3s; position: relative;
}
.product-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow); }
.card-img { height: 180px; display: flex; justify-content: center; align-items: center; margin-bottom: 15px; }
.card-img img { max-width: 90%; max-height: 100%; object-fit: contain; }
.card-category { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 5px; }
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 8px; color: var(--text-main); }
.card-rating { font-size: 0.8rem; color: #f1c40f; margin-bottom: 10px; }
.card-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); margin-top: auto; }

/* Responsive */
@media (max-width: 1024px) {
    .product-hero { gap: 30px; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .product-hero { grid-template-columns: 1fr; }
    .main-image { height: 350px; }
    .product-info h1 { font-size: 1.6rem; }
    .action-buttons { flex-direction: column; }
    .price-current { font-size: 1.6rem; }
    .product-features { flex-wrap: wrap; gap: 15px; }
    .feature-item { min-width: 45%; }
}
@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
    .tab-headers { gap: 15px; overflow-x: auto; white-space: nowrap; padding-bottom: 5px; }
}
