/* Product Detail Page Styles */

.product-detail {
    padding: 40px 20px 80px;
}

.breadcrumb {
    margin-bottom: 40px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--accent);
    transition: var(--transition);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Product Layout */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

/* Gallery */
.product-gallery {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.main-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--light-gray);
    aspect-ratio: 1;
    margin-bottom: 20px;
}

.main-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-image.active {
    opacity: 1;
}

.no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--gray);
    opacity: 0.3;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    transition: var(--transition);
    z-index: 10;
}

.gallery-nav:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

.promo-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(239, 68, 68, 0.95);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    z-index: 10;
}

.promo-badge .discount {
    display: block;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.promo-badge .promo-name {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.9;
}

/* Thumbnails */
.thumbnails-container {
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnails {
    display: flex;
    gap: 10px;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    background: var(--light-gray);
    transition: var(--transition);
    cursor: pointer;
}

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

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

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

/* Product Info */
.product-info-section {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: bold;
}

.product-meta-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--gray);
}

.separator {
    color: var(--light-gray);
}

.product-category {
    color: var(--accent);
    font-weight: 500;
}

.product-pricing {
    margin-bottom: 30px;
}

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

.price-old {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 20px;
}

.price-current {
    font-size: 42px;
    font-weight: bold;
    color: var(--accent);
}

.savings {
    color: #10b981;
    font-size: 14px;
    font-weight: 600;
}

.product-description {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 12px;
    line-height: 1.8;
    color: var(--dark);
}

/* Options Form */
.product-options {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 25px;
}

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

/* Color Swatches */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-swatch {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid transparent;
    background: var(--light-gray);
    transition: var(--transition);
    cursor: pointer;
}

.color-swatch:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.color-swatch.active {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

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

.color-name {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
}

.color-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--gray);
    white-space: nowrap;
}

/* Size Options */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-option {
    padding: 12px 20px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    background: var(--white);
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.size-option:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Quantity Selector */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
}

.qty-btn {
    width: 45px;
    height: 45px;
    background: var(--light-gray);
    color: var(--dark);
    font-size: 20px;
    font-weight: bold;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--primary);
}

.quantity-selector input {
    width: 60px;
    height: 45px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 600;
    background: var(--white);
}

/* Stock Status */
.stock-status {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    background: var(--light-gray);
}

.in-stock {
    color: #10b981;
    font-weight: 600;
}

.out-of-stock {
    color: #ef4444;
    font-weight: 600;
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 100%;
    padding: 18px;
    background: var(--accent);
    color: var(--white);
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.add-to-cart-btn:hover:not(:disabled) {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 115, 85, 0.3);
}

.add-to-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.no-variants-message {
    padding: 20px;
    background: var(--light-gray);
    border-radius: 12px;
    text-align: center;
    color: var(--gray);
}

/* Product Features */
.product-features {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--light-gray);
}

.feature-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: var(--light-gray);
}

.feature-item svg {
    flex-shrink: 0;
    color: var(--accent);
}

.feature-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--dark);
}

.feature-item p {
    font-size: 14px;
    color: var(--gray);
}

/* Similar Products */
.similar-products {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 2px solid var(--light-gray);
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
    color: var(--accent);
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.similar-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid var(--light-gray);
}

.similar-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.similar-image {
    position: relative;
    width: 100%;
    height: 280px;
    background: var(--light-gray);
    overflow: hidden;
}

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

.similar-card:hover .similar-image img {
    transform: scale(1.1);
}

.similar-card .product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
}

.similar-card h3 {
    padding: 15px 15px 5px;
    font-size: 16px;
    color: var(--dark);
}

.similar-price {
    padding: 0 15px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.similar-price .price-old {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 13px;
}

.similar-price .price-current {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent);
}

/* Responsive */
@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .product-gallery {
        position: static;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 28px;
    }
    
    .price-current {
        font-size: 32px;
    }
    
    .similar-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .color-swatches {
        gap: 8px;
    }
    
    .color-swatch {
        width: 60px;
        height: 60px;
    }
}