/* Product Premium Styling for LaTunik */

:root {
    --product-primary: #222222;
    --product-accent: #b9a16b;
    --product-bg-light: #f9f9f9;
    --product-border: #eeeeee;
    --product-text-muted: #767676;
    --product-radius: 12px;
}

.product-single {
    padding-top: 3rem;
    padding-bottom: 5rem;
}

/* Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image-wrapper {
    border-radius: var(--product-radius);
    overflow: hidden;
    background: var(--product-bg-light);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.main-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.thumbnails-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.thumb-item {
    flex: 0 0 80px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumb-item.active, .thumb-item:hover {
    opacity: 1;
    border-color: var(--product-accent);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info Section */
.product-info-column {
    padding-left: 2rem;
}

@media (max-width: 991px) {
    .product-info-column {
        padding-left: 0;
        margin-top: 3rem;
    }
}

.product-title {
    font-family: "Mourich Bold", sans-serif;
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--product-primary);
}

.product-meta-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffc107;
}

.product-price {
    margin-bottom: 2rem;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--product-accent);
}

.old-price {
    font-size: 1.3rem;
    color: var(--product-text-muted);
    text-decoration: line-through;
}

.product-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 2.5rem;
}

/* Swatches */
.swatch-group {
    margin-bottom: 2rem;
}

.swatch-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    color: var(--product-primary);
}

.swatch-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.swatch-btn {
    min-width: 45px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0 10px;
}

.swatch-btn:hover {
    border-color: var(--product-primary);
}

.swatch-btn.active {
    background: var(--product-primary);
    color: #fff;
    border-color: var(--product-primary);
}

.swatch-color {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
}

.swatch-color.active {
    box-shadow: 0 0 0 2px var(--product-accent);
}

/* Actions */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-main-action {
    flex: 1;
    height: 52px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    white-space: nowrap;
}

.btn-add-to-cart {
    background: var(--product-primary);
    color: #fff;
    border: none;
}

.btn-add-to-cart:hover {
    background: var(--product-accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(185, 161, 107, 0.4);
}

.btn-customize {
    background: #fff;
    color: var(--product-primary);
    border: 2px solid var(--product-primary);
}

.btn-customize:hover {
    background: var(--product-primary);
    color: #fff;
}

/* Tabs */
.product-tabs-section {
    margin-top: 5rem;
    border-top: 1px solid var(--product-border);
}

.nav-tabs-premium {
    border-bottom: none;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.nav-tabs-premium .nav-link {
    border: none;
    background: none;
    padding: 1.5rem 0;
    font-weight: 600;
    color: var(--product-text-muted);
    position: relative;
    font-size: 1.1rem;
}

.nav-tabs-premium .nav-link.active {
    color: var(--product-primary);
    background: none;
}

.nav-tabs-premium .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--product-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-tabs-premium .nav-link.active::after {
    width: 100%;
}

.tab-content-premium {
    padding: 2rem 0;
    line-height: 1.8;
    color: #444;
}

/* Modal Premium */
.custom-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100%;
    background: #fff;
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.custom-sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 2rem;
    border-bottom: 1px solid var(--product-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-family: "Mourich Bold", sans-serif;
    margin: 0;
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.sidebar-footer {
    padding: 2rem;
    border-top: 1px solid var(--product-border);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.custom-option {
    margin-bottom: 2rem;
}

.custom-option-title {
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.form-select-premium, .form-control-premium {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-select-premium:focus, .form-control-premium:focus {
    border-color: var(--product-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(185, 161, 107, 0.1);
}

.size-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Quantity Control */
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--product-primary);
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--product-bg-light);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--product-primary);
}

.qty-btn:hover {
    background: var(--product-primary);
    color: #fff;
}

.qty-btn:active {
    transform: scale(0.9);
}

.qty-input {
    width: 50px;
    height: 40px;
    border: none;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    outline: none;
    background: #fff;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Color swatch interactivity */
.swatch-color {
    cursor: pointer;
    transition: all 0.3s ease;
}

.swatch-color:hover {
    transform: scale(1.15);
}

/* Success state for add-to-cart button */
.btn-success {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
}

/* Responsive sidebar */
@media (max-width: 768px) {
    .custom-sidebar {
        width: 100%;
        right: -100%;
    }

    .product-title {
        font-size: 2rem;
    }

    .nav-tabs-premium {
        gap: 1rem;
    }

    .nav-tabs-premium .nav-link {
        font-size: 0.95rem;
    }
}

/* Boutons pleine largeur sur mobile et tablette */
@media (max-width: 991px) {
    .product-single .product-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .product-single .product-actions .btn-main-action {
        width: 100%;
        flex: none;
    }
}
