/* Product View Page Styles */

/* Back Button Styles */
.back-button-container {
    margin-bottom: 20px;
    padding: 0 20px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.back-button:hover {
    background-color: #e9ecef;
    border-color: #bbb;
    transform: translateX(-2px);
}

.back-button:active {
    transform: translateX(-1px);
}

.back-button svg {
    flex-shrink: 0;
}

/* Product Image Gallery Styles */
.product-image-gallery {
    position: relative;
}

/* Image transition effects for variety changes */
.main-product-image {
    max-width: 500px;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s ease-in-out;
}

/* Variety selection styles */
.variety-selector {
    margin-bottom: 20px;
}

.variety-option {
    margin-bottom: 10px;
}

.variety-btn {
    display: inline-block;
    padding: 8px 16px;
    margin-left: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
    text-decoration: none;
    color: #333;
}

.variety-btn:hover {
    border-color: #b0302f;
    background-color: #f8f9fa;
}

.variety-btn.active {
    background-color: #b0302f !important;
    border-color: #b0302f !important;
    color: white !important;
}

/* Image loading indicator */
.image-loading {
    opacity: 0.6;
}

/* Enhanced gallery navigation for variety-specific images */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
}

.gallery-nav:hover {
    background: rgba(176, 48, 47, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

.image-container {
    position: relative;
    width: 500px;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
    margin: 0 auto;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: grab;
    transition: transform 0.3s ease;
    transform-origin: center center;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.main-product-image:active {
    cursor: grabbing;
}

.zoom-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    z-index: 15;
}

.zoom-btn {
    width: 35px;
    height: 35px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(0,0,0,0.9);
}

.zoom-btn:disabled {
    background: rgba(0,0,0,0.3);
    cursor: not-allowed;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(0,0,0,0.7);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

.image-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
}

/* Product Details Styles */
.product-details {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.left-side {
    flex: 1;
}

.right-side {
    flex: 1;
    padding: 20px;
}

.product-price {
    font-size: 24px;
    color: #b0302f;
    font-weight: bold;
    margin: 10px 0;
}

.product-stock {
    color: #666;
    margin-bottom: 20px;
}

/* Variety and Size Selection Styles */
.variety-option {
    margin-bottom: 15px;
}

.variety-btn, .size-btn {
    display: inline-block;
    padding: 10px 16px;
    margin: 4px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    min-width: 50px;
}

.variety-btn:hover, .size-btn:hover {
    border-color: #b0302f;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.variety-btn.active, .size-btn.active {
    background-color: #b0302f;
    border-color: #b0302f;
    color: white;
}

.size-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.add-to-cart {
    background-color: #b0302f;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.add-to-cart:hover {
    background-color: #8a2426;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.add-to-cart:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error messages */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Responsive design */
@media (max-width: 768px) {
    .product-details {
        flex-direction: column;
        padding: 10px;
    }

    .image-container {
        width: 100%;
        max-width: 400px;
        height: 400px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f8f9fa;
    }

    .main-product-image {
        max-width: 400px;
        max-height: 400px;
        width: auto;
        height: auto;
        object-fit: contain;
        background-color: transparent;
    }

    .size-selector {
        justify-content: center;
    }

    .variety-btn, .size-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .zoom-controls {
        bottom: 5px;
        left: 5px;
    }

    .zoom-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .image-container {
        width: 100%;
        height: 300px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f8f9fa;
    }

    .main-product-image {
        max-width: 300px;
        max-height: 300px;
        width: auto;
        height: auto;
        object-fit: contain;
        background-color: transparent;
    }
}