/* ================================================================
   PRODUCT DETAIL PAGE - YEE E-COMMERCE
   Rhode Skin Inspired Design
   ================================================================ */

/* Variables CSS pour cohérence avec Rhode */
:root {
    --rhode-black: #000000;
    --rhode-white: #ffffff;
    --rhode-cream: #faf9f7;
    --rhode-gray-light: #f5f5f5;
    --rhode-gray-medium: #999999;
    --rhode-gray-dark: #666666;
    --rhode-sage: #a8b5a0;
    --rhode-accent: #d4a574;
    --rhode-border: #e8e8e8;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    --transition-default: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* Container principal de la page produit */
.rhode-product-page {
    background: var(--rhode-white);
    min-height: 100vh;
}

/* ================================================================
   HERO SECTION - PRODUCT IMAGES & INFO
   ================================================================ */

.product-hero {
    padding: 2rem 0 4rem;
    background: var(--rhode-white);
}

/* Images du produit */
.product-images {
    position: relative;
}

.main-image {
    margin-bottom: 1rem;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background: var(--rhode-gray-light);
}

.main-product-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: var(--transition-default);
}

.main-product-image:hover {
    transform: scale(1.02);
}

/* Galerie de thumbnails */
.image-thumbnails {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-default);
}

.thumbnail.active {
    border-color: var(--rhode-black);
}

.thumbnail:hover {
    border-color: var(--rhode-gray-medium);
}

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

/* ================================================================
   PRODUCT INFO SECTION
   ================================================================ */

.product-info {
    padding-left: 2rem;
}

.product-category {
    margin-bottom: 0.5rem;
}

.product-category span {
    font-size: 0.85rem;
    color: var(--rhode-gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: var(--font-weight-medium);
}

.product-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-light);
    color: var(--rhode-black);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-transform: lowercase;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: var(--rhode-accent);
    font-size: 1rem;
}

.star.filled {
    color: var(--rhode-accent);
}

.star.half {
    color: var(--rhode-gray-medium);
}

.rating-text {
    font-size: 0.85rem;
    color: var(--rhode-gray-medium);
}

/* Description */
.product-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--rhode-gray-dark);
    margin-bottom: 2rem;
}

/* Prix */
.product-price {
    margin-bottom: 2rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--rhode-black);
}

.original-price {
    font-size: 1.25rem;
    color: var(--rhode-gray-medium);
    text-decoration: line-through;
    margin-left: 0.75rem;
}

/* ================================================================
   PRODUCT OPTIONS - SIZE, COLOR, QUANTITY
   ================================================================ */

/* Sélection de taille */
.size-selection {
    margin-bottom: 2rem;
}

.size-label {
    display: block;
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    color: var(--rhode-black);
    margin-bottom: 0.75rem;
    text-transform: lowercase;
}

.size-options {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.size-option {
    min-width: 44px;
    height: 44px;
    border: 1px solid var(--rhode-border);
    background: var(--rhode-white);
    color: var(--rhode-black);
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
}

.size-option:hover {
    border-color: var(--rhode-black);
    background: var(--rhode-gray-light);
}

.size-option.active {
    border-color: var(--rhode-black);
    background: var(--rhode-black);
    color: var(--rhode-white);
}

.size-guide-link {
    font-size: 0.85rem;
    color: var(--rhode-gray-medium);
    text-decoration: underline;
    transition: var(--transition-default);
}

.size-guide-link:hover {
    color: var(--rhode-black);
}

/* Sélection de couleur */
.color-selection {
    margin-bottom: 2rem;
}

.color-label {
    display: block;
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    color: var(--rhode-black);
    margin-bottom: 0.75rem;
    text-transform: lowercase;
}

.selected-color {
    font-weight: var(--font-weight-regular);
}

.color-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-option {
    width: 32px;
    height: 32px;
    border: 2px solid var(--rhode-border);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-default);
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: var(--rhode-gray-medium);
}

.color-option.active {
    border-color: var(--rhode-black);
    transform: scale(1.1);
}

.color-option.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--rhode-black);
    border-radius: 50%;
}

/* Sélection de quantité */
.quantity-selection {
    margin-bottom: 2rem;
}

.quantity-label {
    display: block;
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    color: var(--rhode-black);
    margin-bottom: 0.75rem;
    text-transform: lowercase;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--rhode-border);
    border-radius: var(--border-radius-sm);
    width: fit-content;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--rhode-white);
    color: var(--rhode-black);
    font-size: 1.2rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: var(--rhode-gray-light);
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--rhode-border);
    border-right: 1px solid var(--rhode-border);
    text-align: center;
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    background: var(--rhode-white);
}

.quantity-input:focus {
    outline: none;
    background: var(--rhode-gray-light);
}

/* ================================================================
   PRODUCT ACTIONS - ADD TO CART
   ================================================================ */

.product-actions {
    margin-bottom: 2rem;
}

.add-to-cart {
    width: 100%;
    max-width: 400px;
    padding: 1rem 2rem;
    background: var(--rhode-black);
    color: var(--rhode-white);
    border: none;
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-default);
    border-radius: var(--border-radius-sm);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.add-to-cart:hover {
    background: var(--rhode-gray-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.add-to-cart:active {
    transform: translateY(0);
}

/* Features du produit */
.product-features {
    border-top: 1px solid var(--rhode-border);
    padding-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--rhode-gray-dark);
}

.feature-icon {
    color: var(--rhode-sage);
    font-weight: var(--font-weight-semibold);
}

/* ================================================================
   PRODUCT DETAILS TABS
   ================================================================ */

.product-details {
    padding: 4rem 0;
    background: var(--rhode-cream);
}

.product-tabs {
    background: var(--rhode-white);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.nav-tabs {
    border-bottom: 1px solid var(--rhode-border);
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    border: none;
    background: none;
    color: var(--rhode-gray-medium);
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    text-transform: lowercase;
    padding: 1rem 0;
    margin-right: 2rem;
    border-bottom: 2px solid transparent;
    transition: var(--transition-default);
}

.nav-tabs .nav-link:hover {
    color: var(--rhode-black);
    border-bottom-color: var(--rhode-gray-medium);
}

.nav-tabs .nav-link.active {
    color: var(--rhode-black);
    border-bottom-color: var(--rhode-black);
}

.tab-content-inner {
    max-width: 800px;
}

.tab-content-inner h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--rhode-black);
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.tab-content-inner h4 {
    font-size: 1.1rem;
    font-weight: var(--font-weight-medium);
    color: var(--rhode-black);
    margin-bottom: 0.75rem;
    text-transform: lowercase;
}

.tab-content-inner p {
    line-height: 1.6;
    color: var(--rhode-gray-dark);
    margin-bottom: 1.5rem;
}

.tab-content-inner ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.tab-content-inner li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--rhode-gray-dark);
    line-height: 1.5;
}

.tab-content-inner li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--rhode-sage);
    font-weight: var(--font-weight-bold);
}

/* Matériaux */
.material-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--rhode-gray-light);
    border-radius: var(--border-radius-sm);
}

.composition-note {
    font-weight: var(--font-weight-medium);
    color: var(--rhode-black);
    background: var(--rhode-cream);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--rhode-sage);
}

/* Instructions d'entretien */
.care-instructions {
    margin-bottom: 2rem;
}

.care-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--rhode-gray-light);
    border-radius: var(--border-radius-sm);
}

.care-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.care-item h4 {
    margin-bottom: 0.5rem;
}

.care-tips {
    background: var(--rhode-cream);
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--rhode-accent);
}

/* Guide des tailles */
.size-chart {
    margin-bottom: 2rem;
    overflow-x: auto;
}

.size-chart table {
    width: 100%;
    border-collapse: collapse;
    background: var(--rhode-white);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.size-chart th,
.size-chart td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--rhode-border);
}

.size-chart th {
    background: var(--rhode-gray-light);
    font-weight: var(--font-weight-semibold);
    color: var(--rhode-black);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.size-chart td {
    color: var(--rhode-gray-dark);
}

.size-tips {
    background: var(--rhode-cream);
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--rhode-sage);
}

.size-note {
    font-style: italic;
    color: var(--rhode-gray-medium);
    margin-top: 1rem;
}

/* ================================================================
   CUSTOMER REVIEWS SECTION
   ================================================================ */

.customer-reviews {
    padding: 4rem 0;
    background: var(--rhode-white);
}

.reviews-title {
    font-size: 2rem;
    font-weight: var(--font-weight-light);
    color: var(--rhode-black);
    text-align: center;
    margin-bottom: 2rem;
    text-transform: lowercase;
}

.reviews-summary {
    text-align: center;
    margin-bottom: 3rem;
}

.rating-overview {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.average-rating {
    font-size: 2rem;
    font-weight: var(--font-weight-semibold);
    color: var(--rhode-black);
}

.review-count {
    font-size: 0.9rem;
    color: var(--rhode-gray-medium);
}

/* Cartes d'avis */
.review-card {
    background: var(--rhode-cream);
    padding: 2rem;
    border-radius: var(--border-radius-md);
    height: 100%;
    transition: var(--transition-default);
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.review-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    flex: 1;
}

.reviewer-info strong {
    font-weight: var(--font-weight-semibold);
    color: var(--rhode-black);
    text-transform: lowercase;
}

.verified-buyer {
    display: block;
    font-size: 0.75rem;
    color: var(--rhode-gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.review-rating {
    margin-left: 1rem;
}

.review-card h4 {
    font-size: 1.1rem;
    font-weight: var(--font-weight-medium);
    color: var(--rhode-black);
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.review-card p {
    color: var(--rhode-gray-dark);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.review-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--rhode-sage);
    color: var(--rhode-white);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    text-transform: lowercase;
}

/* ================================================================
   RELATED PRODUCTS SECTION
   ================================================================ */

.related-products {
    padding: 4rem 0;
    background: var(--rhode-gray-light);
}

.section-title {
    font-size: 2rem;
    font-weight: var(--font-weight-light);
    color: var(--rhode-black);
    text-align: center;
    margin-bottom: 3rem;
    text-transform: lowercase;
}

/* Cartes produits reliés */
.product-card {
    background: var(--rhode-white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition-default);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-default);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-default);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-overlay .btn {
    background: var(--rhode-white);
    color: var(--rhode-black);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-default);
}

.product-overlay .btn:hover {
    background: var(--rhode-black);
    color: var(--rhode-white);
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.5rem;
}

.product-name a {
    color: var(--rhode-black);
    text-decoration: none;
    transition: var(--transition-default);
}

.product-name a:hover {
    color: var(--rhode-gray-dark);
}

.product-price {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--rhode-accent);
    margin: 0;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

@media (max-width: 991.98px) {
    .product-info {
        padding-left: 0;
        margin-top: 2rem;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .size-options,
    .color-options {
        justify-content: center;
    }
    
    .add-to-cart {
        max-width: none;
    }
    
    .nav-tabs .nav-link {
        margin-right: 1rem;
        padding: 0.75rem 0;
    }
}

@media (max-width: 767.98px) {
    .product-hero {
        padding: 1rem 0 2rem;
    }
    
    .product-title {
        font-size: 1.75rem;
    }
    
    .product-details,
    .customer-reviews,
    .related-products {
        padding: 2rem 0;
    }
    
    .product-tabs {
        padding: 1rem;
    }
    
    .tab-content-inner {
        max-width: none;
    }
    
    .care-item {
        flex-direction: column;
        text-align: center;
    }
    
    .size-chart {
        font-size: 0.85rem;
    }
    
    .review-card {
        padding: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .image-thumbnails {
        justify-content: center;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-tabs .nav-link {
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem 0;
        font-size: 0.85rem;
    }
    
    .reviews-title,
    .section-title {
        font-size: 1.5rem;
    }
    
    .rating-overview {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ================================================================
   ANIMATIONS ET EFFETS
   ================================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-hero .container {
    animation: fadeInUp 0.8s ease-out;
}

.product-tabs {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.review-card {
    animation: fadeInUp 0.6s ease-out calc(var(--delay, 0) * 0.1s) both;
}

.product-card {
    animation: fadeInUp 0.6s ease-out calc(var(--delay, 0) * 0.1s) both;
}

/* Styles pour les badges des avis */
.product-badge-new,
.product-badge-bestseller,
.product-badge-trending,
.product-badge-viral,
.product-badge-limited {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.product-badge-new {
    background: var(--rhode-sage);
    color: var(--rhode-white);
}

.product-badge-bestseller {
    background: var(--rhode-accent);
    color: var(--rhode-white);
}

.product-badge-trending {
    background: var(--rhode-black);
    color: var(--rhode-white);
}

.product-badge-viral {
    background: #ff6b6b;
    color: var(--rhode-white);
}

.product-badge-limited {
    background: #4ecdc4;
    color: var(--rhode-white);
}

/* Focus states pour l'accessibilité */
.size-option:focus,
.color-option:focus,
.quantity-btn:focus,
.quantity-input:focus,
.add-to-cart:focus,
.nav-tabs .nav-link:focus {
    outline: 2px solid var(--rhode-sage);
    outline-offset: 2px;
}

/* Loading state pour le bouton add to cart */
.add-to-cart.loading {
    position: relative;
    color: transparent;
}

.add-to-cart.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--rhode-white);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success notification */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--rhode-sage);
    color: var(--rhode-white);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.error {
    background: #e74c3c;
}

.notification.success {
    background: var(--rhode-sage);
}
