/* product_details.css - Styles pour la page de détails produit */

:root {
    --primary-blue: #f57c00;
    --border-color: #e9ecef;
    --text-dark: #333;
    --text-muted: #6c757d;
    --success-green: #28a745;
    --warning-yellow: #ffc107;
    --danger-red: #dc3545;
}

.product-details-page {
    padding: 40px 0 60px;
}

/* Page Header */
.page-header-section {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.breadcrumb-nav a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

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

.breadcrumb-nav .separator {
    color: var(--text-muted);
}

/* Product Images Section */
.product-images-section {
    position: relative;
}

.image-zoom-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    cursor: crosshair;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.1s ease;
}

.zoom-lens {
    position: absolute;
    border: 2px solid var(--primary-blue);
    width: 100px;
    height: 100px;
    background: rgba(245, 124, 0, 0.1);
    pointer-events: none;
    display: none;
    z-index: 10;
    border-radius: 50%;
}

.zoom-result {
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 500px;
    height: 500px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    background-repeat: no-repeat;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

@media (max-width: 1199px) {
    .zoom-result {
        left: auto;
        right: 0;
        top: calc(100% + 20px);
        width: 100%;
        max-width: 400px;
        height: 400px;
    }
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    display: flex;
    gap: 12px;
    align-items: center;
    position: relative;
}

.thumbnail-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.thumbnail-scroll::-webkit-scrollbar {
    display: none;
}

.thumbnail-item {
    min-width: 80px;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    padding: 5px;
}

.thumbnail-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.thumbnail-item.active {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(245, 124, 0, 0.2);
}

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

.thumbnail-nav {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail-nav:hover {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
    transform: scale(1.1);
}

/* Product Info Section */
.product-info-section {
    padding-left: 30px;
}

.product-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

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

.stars {
    color: var(--warning-yellow);
    font-size: 1.1rem;
}

.rating-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.old-price {
    font-size: 1.3rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.discount-badge {
    background: var(--danger-red);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    color: var(--success-green);
    font-weight: 500;
}

.stock-status i {
    font-size: 1.2rem;
}

/* Product Stock Status Display */
.product-stock-status {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
}

.product-stock-status .stock-in {
    display: flex;
    align-items: center;
    color: var(--success-green);
    font-weight: 500;
    font-size: 0.95rem;
}

.product-stock-status .stock-out {
    display: flex;
    align-items: center;
    color: var(--danger-red);
    font-weight: 500;
    font-size: 0.95rem;
}

.product-stock-status i {
    font-size: 1.1rem;
}

/* Color Selection */
.color-selection {
    margin-bottom: 25px;
}

.color-label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: var(--text-dark);
}

.color-name {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.color-swatches {
    display: flex;
    gap: 12px;
    align-items: center;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-swatch.active {
    border-color: var(--text-dark);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.color-swatch.active::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Color swatches - common colors */
.color-swatch.black {
    background-color: #000;
}

.color-swatch.grey,
.color-swatch.gray {
    background-color: #d3d3d3;
}

.color-swatch.blue {
    background-color: #1e3a8a;
}

.color-swatch.pink {
    background-color: #c2185b;
}

.color-swatch.red {
    background-color: #dc3545;
}

.color-swatch.white {
    background-color: #fff;
    border: 2px solid var(--border-color);
}

/* Size Selection */
.size-selection {
    margin-bottom: 25px;
}

.size-label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: var(--text-dark);
}

.size-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-btn {
    min-width: 50px;
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(245, 124, 0, 0.2);
}

.size-btn.active {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(245, 124, 0, 0.3);
}

/* Quantity Selection */
.quantity-selection {
    margin-bottom: 30px;
}

.quantity-label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: var(--text-dark);
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-control--full{
    display: flex;
    width: 100%;
}

.quantity-control button {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.quantity-control button:hover {
    background: var(--primary-blue);
    color: #fff;
}

.quantity-control input {
    flex: 1;
    width: auto;
    min-width: 80px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.action-buttons--compact{
    flex-wrap: nowrap;
    align-items: center;
}

.btn-add-cart {
    flex: 1;
    min-width: 200px;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-add-cart:hover {
    background: #0a3d91;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

.btn-add-cart.btn-success {
    background: var(--success-green);
}

.btn-buy-now {
    flex: 1;
    min-width: 200px;
    background: #fff;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    padding: 14px 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-buy-now:hover {
    background: var(--primary-blue);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

.btn-wishlist {
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--danger-red);
}

.btn-wishlist i{
    font-size: 1.05rem;
    opacity: .9;
}

/* Purchase actions row */
.purchase-actions-row{
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.purchase-actions-row .btn-purchase-add-cart{
    flex: 1;
    margin-bottom: 0;
}

.purchase-actions-row .btn-purchase-wishlist{
    width: 52px;
    min-width: 52px;
    padding: 12px 0;
    margin-bottom: 0;
    justify-content: center;
}

.purchase-actions-row .btn-purchase-wishlist i{
    margin: 0;
    opacity: .9;
}

/* Make color swatches real buttons */
.color-swatch{
    appearance: none;
    border: 3px solid transparent;
    padding: 0;
}

.btn-wishlist:hover {
    border-color: var(--danger-red);
    color: var(--danger-red);
    background: #fff5f5;
    transform: scale(1.1);
}

.btn-wishlist.active {
    background: var(--danger-red);
    color: #fff;
    border-color: var(--danger-red);
}

/* Product Policies */
.product-policies {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.policy-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.policy-item i {
    color: var(--primary-blue);
    font-size: 1.2rem;
}

/* Purchase Section Card (Right) */
.purchase-section-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: visible;
}

.purchase-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.purchase-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success-green);
    font-weight: 500;
    margin-bottom: 24px;
}

.purchase-stock.out-of-stock {
    color: var(--danger-red);
}

.purchase-stock.out-of-stock i {
    color: var(--danger-red);
}

.purchase-stock i {
    font-size: 1.1rem;
}

.purchase-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.purchase-qty-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
}

.purchase-qty-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.15);
}

.btn-purchase-add-cart {
    width: 100%;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-purchase-add-cart:hover {
    background: #0a3d91;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

.btn-purchase-add-cart.btn-success {
    background: var(--success-green);
}

.btn-purchase-wishlist {
    width: 100%;
    background: #fff;
    color: var(--danger-red);
    border: 2px solid var(--danger-red);
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-purchase-wishlist:hover {
    background: var(--danger-red);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-purchase-wishlist.active {
    background: var(--danger-red);
    color: #fff;
}

.purchase-summary {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.summary-price {
    font-weight: 600;
    color: var(--text-dark);
}

.summary-stock {
    font-weight: 600;
    color: var(--text-dark);
}

.purchase-thumbnail {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    padding: 8px;
    max-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.purchase-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.purchase-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.purchase-trust span:not(:last-child) {
    margin-right: 4px;
}

/* Share buttons */
.share-section{
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 8px;
}

.share-label{
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.share-buttons{
    display: flex;
    gap: 10px;
    align-items: center;
}

.share-btn{
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.share-btn i{
    font-size: 1.05rem;
    opacity: .9;
}

.share-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.share-btn--whatsapp{ color:#25D366; border-color: rgba(37,211,102,.25); }
.share-btn--facebook{ color:#1877F2; border-color: rgba(24,119,242,.25); }
.share-btn--x{ color:#111; border-color: rgba(17,17,17,.18); }
.share-btn--copy{ color: var(--primary-blue); border-color: rgba(245,124,0,.22); }

.share-btn.is-copied{
    background: rgba(40,167,69,.12);
    border-color: rgba(40,167,69,.35);
    color: var(--success-green);
}

/* Product Tabs */
.product-tabs-wrapper {
    margin-top: 60px;
}

.product-detail-tabs {
    border-bottom: 2px solid var(--border-color);
}

.product-detail-tabs .nav-link {
    font-weight: 600;
    color: var(--text-muted);
    padding: 12px 24px;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    background: transparent;
}

.product-detail-tabs .nav-link:hover {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.product-detail-tabs .nav-link.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    background-color: transparent;
}

.product-detail-tab-content {
    padding: 30px 0 0;
}

.tab-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.tab-section-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.tab-text {
    color: var(--text-muted);
    line-height: 1.7;
}

.tab-list {
    padding-left: 18px;
    margin-bottom: 0;
    color: var(--text-muted);
}

.tab-list li {
    margin-bottom: 6px;
}

.specs-table {
    width: 100%;
}

.specs-table th {
    width: 220px;
    font-weight: 600;
    color: var(--text-dark);
    padding: 12px 0;
}

.specs-table td {
    color: var(--text-muted);
    padding: 12px 0;
}

.specs-table tr:not(:last-child) th,
.specs-table tr:not(:last-child) td {
    border-bottom: 1px solid var(--border-color);
}

/* Reviews Section */
.reviews-summary-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.average-rating {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
}

.average-stars {
    color: var(--warning-yellow);
    font-size: 1.2rem;
    margin: 10px 0;
}

.rating-bars {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rating-bars li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.rating-bar {
    flex: 1;
    height: 6px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background-color: var(--warning-yellow);
    transition: width 0.5s ease;
}

.rating-count {
    min-width: 24px;
    text-align: right;
}

.write-review-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.star-rating-input {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.star-rating-input i {
    font-size: 1.4rem;
    color: var(--warning-yellow);
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-rating-input i:hover {
    transform: scale(1.2);
}

.customer-reviews-list .review-item {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.03);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.customer-reviews-list .review-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.customer-reviews-list .review-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.customer-reviews-list .review-text {
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

.customer-reviews-list .review-stars {
    color: var(--warning-yellow);
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .product-info-section {
        padding-left: 0;
        margin-top: 30px;
    }

    .image-zoom-container {
        height: 400px;
    }

    .purchase-section-card {
        position: static;
        max-height: none;
        margin-top: 30px;
    }
}

@media (max-width: 767.98px) {
    .product-detail-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .product-detail-tabs .nav-link {
        white-space: nowrap;
        padding: 10px 16px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-add-cart,
    .btn-buy-now {
        width: 100%;
        min-width: auto;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .current-price {
        font-size: 1.5rem;
    }

    .purchase-price {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-details-page {
    animation: fadeIn 0.6s ease-out;
}

.tab-pane {
    animation: fadeIn 0.4s ease-out;
}

/* Login Required Message for Reviews */
.alert-info {
    border-radius: 12px;
    border: 1px solid rgba(245, 124, 0, 0.2);
    background: linear-gradient(135deg, rgba(245, 124, 0, 0.05) 0%, rgba(245, 124, 0, 0.02) 100%);
}

.alert-info .fa-lock {
    opacity: 0.8;
}

.alert-info h4 {
    color: var(--primary-blue);
    font-weight: 600;
}

.alert-info .btn-lg {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.alert-info .btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
