/**
 * HarryShop - Product Detail Page CSS
 * Trang chi tiết sản phẩm
 */

/* ===== Breadcrumb ===== */
.breadcrumb-section {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    color: #999;
}

.breadcrumb li a {
    color: #666;
}

.breadcrumb li a:hover {
    color: var(--primary-color);
}

.breadcrumb li:last-child {
    color: #333;
    font-weight: 500;
}

/* ===== Product Detail Page ===== */
.product-detail-page {
    padding: 30px 0;
}

.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

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

.main-image {
    position: relative;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: #fafafa;
}

.main-image .product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ffb400;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
}

.thumbnail {
    flex: 1;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 70px;
    object-fit: contain;
}

/* ===== Product Info Detail ===== */
.product-info-detail {
    padding-right: 20px;
}

.product-title-detail {
    font-size: 24px;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.product-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-meta .status.in-stock {
    color: #28a745;
}

.product-meta .status.out-of-stock {
    color: #dc3545;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.product-rating .stars {
    color: #ffc107;
    font-size: 16px;
}

.product-rating .rating-count {
    color: #666;
    font-size: 13px;
}

/* ===== Product Price ===== */
.product-price-detail {
    background: #fff8f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.product-price-detail .price-old {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    display: block;
    margin-bottom: 5px;
}

.product-price-detail .price-new {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.product-price-detail .price-save {
    font-size: 13px;
    color: #28a745;
    font-weight: 500;
}

/* ===== Product Short Description ===== */
.product-short-desc {
    margin-bottom: 25px;
}

.product-short-desc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-short-desc li {
    padding: 8px 0;
    font-size: 14px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px dashed #eee;
}

.product-short-desc li i {
    color: #28a745;
    font-size: 12px;
}

/* ===== Product Actions ===== */
.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 45px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: #e5e5e5;
}

.qty-input {
    width: 60px;
    height: 45px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-add-cart,
.btn-buy-now {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-add-cart {
    background: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-add-cart:hover {
    background: #fff0f0;
}

.btn-buy-now {
    background: var(--primary-color);
    color: #fff;
}

.btn-buy-now:hover {
    background: #b00606;
}

/* ===== Product Hotline ===== */
.product-hotline {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 25px;
}

.product-hotline i {
    font-size: 24px;
    color: var(--primary-color);
}

.product-hotline span {
    display: block;
    font-size: 13px;
    color: #666;
}

.product-hotline a {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== Product Policies ===== */
.product-policies {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.policy-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 13px;
    color: #444;
}

.policy-item i {
    color: var(--primary-color);
    font-size: 18px;
}

/* ===== Product Tabs ===== */
.product-tabs {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.tab-headers {
    display: flex;
    border-bottom: 2px solid #eee;
}

.tab-header {
    padding: 18px 30px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab-header:hover {
    color: var(--primary-color);
}

.tab-header.active {
    color: var(--primary-color);
}

.tab-header.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
}

.tab-contents {
    padding: 30px;
}

.tab-content {
    display: none;
}

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

.tab-content h2 {
    font-size: 20px;
    color: #0a0a0a;
    margin-bottom: 15px;
}

.tab-content h3 {
    font-size: 17px;
    color: #0a0a0a;
    margin: 25px 0 12px;
}

.tab-content p {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

.tab-content ul,
.tab-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.tab-content li {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 8px;
}

/* ===== Specs Table ===== */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.specs-table th.spec-category {
    background: #f8f8f8;
    color: #0a0a0a;
    font-weight: 600;
    font-size: 15px;
}

.specs-table td:first-child {
    width: 200px;
    color: #666;
    font-weight: 500;
}

.specs-table tr:hover td {
    background: #fafafa;
}

/* ===== Reviews Summary ===== */
.reviews-summary {
    display: flex;
    gap: 40px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 10px;
    margin-bottom: 30px;
}

.rating-overview {
    text-align: center;
    min-width: 150px;
}

.rating-score {
    font-size: 48px;
    font-weight: 700;
    color: #0a0a0a;
}

.rating-overview .rating-stars {
    color: #ffc107;
    font-size: 18px;
    margin-bottom: 5px;
}

.rating-total {
    font-size: 13px;
    color: #666;
}

.rating-bars {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}

.rating-bar span:first-child {
    width: 50px;
    color: #666;
}

.rating-bar span:last-child {
    width: 30px;
    text-align: right;
    color: #666;
}

.rating-bar .bar {
    flex: 1;
    height: 10px;
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.rating-bar .fill {
    height: 100%;
    background: #ffc107;
    border-radius: 5px;
}

/* ===== Review List ===== */
.review-list {
    margin-bottom: 25px;
}

.review-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.review-item.reply {
    margin-left: 50px;
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    border-bottom: none;
    margin-bottom: 10px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reviewer-avatar i {
    font-size: 20px;
    color: #999;
}

.review-content {
    flex: 1;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.reviewer-info {
    flex: 1;
}

.reviewer-name {
    font-weight: 600;
    color: #0a0a0a;
    display: block;
}

.review-date {
    font-size: 12px;
    color: #999;
}

.review-rating {
    color: #ffc107;
    font-size: 14px;
}

.review-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 10px;
}

.btn-reply {
    border: none;
    background: none;
    color: var(--primary-color);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-reply:hover {
    text-decoration: underline;
}

.btn-load-more {
    width: 100%;
    padding: 15px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-load-more:hover {
    background: #eee;
    color: var(--primary-color);
}

/* ===== Related Products ===== */
.related-products {
    background: #fff;
    border-radius: 10px;
    padding: 0 0 25px;
    overflow: hidden;
}

.related-products .section-header {
    border-bottom: 2px solid var(--primary-color);
}

.related-products .product-grid {
    padding: 25px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: static;
    }
}

@media (max-width: 768px) {
    .product-detail-wrapper {
        padding: 20px;
    }

    .main-image img {
        height: 300px;
    }

    .product-title-detail {
        font-size: 20px;
    }

    .product-price-detail .price-new {
        font-size: 24px;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn-add-cart,
    .btn-buy-now {
        width: 100%;
        justify-content: center;
    }

    .product-policies {
        grid-template-columns: 1fr;
    }

    .tab-headers {
        flex-wrap: wrap;
    }

    .tab-header {
        padding: 12px 20px;
        font-size: 14px;
    }

    .reviews-summary {
        flex-direction: column;
        gap: 20px;
    }

    .review-item.reply {
        margin-left: 20px;
    }
}

@media (max-width: 576px) {
    .thumbnail-list {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }

    .thumbnail img {
        height: 50px;
    }

    .product-meta {
        gap: 10px;
    }

    .breadcrumb {
        font-size: 12px;
    }
}
