* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.product-title {
    font-size: 2.5em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.product-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

/* Product Gallery Styles */
.product-gallery {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
}

.main-image {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.main-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

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

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.thumbnail-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail-images img:hover {
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Product Info Styles */
.product-info {
    padding: 20px;
}

.price-section {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f6f9fc 0%, #e6f0f9 100%);
    border-radius: 10px;
}

.current-price {
    font-size: 2.5em;
    font-weight: bold;
    color: #28a745;
    margin-right: 15px;
}

.original-price {
    font-size: 1.3em;
    color: #999;
    text-decoration: line-through;
    margin-right: 15px;
}

.discount-badge {
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.video-container {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-description {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.product-description h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.product-description ul {
    list-style-type: none;
    padding-left: 0;
}

.product-description li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.product-description li:before {
    content: "✓";
    color: #28a745;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.purchase-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.quantity-selector {
    margin-bottom: 20px;
}

.quantity-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.quantity-selector select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-selector select:hover {
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.quantity-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.total-amount {
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745;
    margin: 20px 0;
    padding: 15px;
    background: #f0f9f0;
    border-radius: 8px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.order-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.order-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

.order-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive Design */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .product-title {
        font-size: 2em;
    }

    .product-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .thumbnail-images {
        grid-template-columns: repeat(3, 1fr);
    }

    .current-price {
        font-size: 2em;
    }

    .original-price {
        font-size: 1.1em;
    }

    .total-amount {
        font-size: 1.5em;
    }

    .order-btn {
        padding: 15px;
        font-size: 1.1em;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 20px;
    }

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

    .product-wrapper {
        padding: 15px;
    }

    .price-section {
        text-align: center;
    }

    .current-price {
        display: block;
        margin-bottom: 5px;
    }

    .original-price {
        display: block;
        margin-bottom: 5px;
    }

    .discount-badge {
        display: inline-block;
    }

    .thumbnail-images {
        gap: 5px;
    }

    .total-amount {
        font-size: 1.3em;
        padding: 10px;
    }

    .quantity-selector select {
        padding: 10px;
        font-size: 0.9em;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f6f7f8 8%, #edeef1 18%, #f6f7f8 33%);
    background-size: 1000px 100%;
}

/* Add this to your existing style.css file */

/* Thumbnail active state */
.thumbnail-images img.active-thumbnail {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    opacity: 1;
}

/* Main image styling */
.main-image {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: #f5f5f5; /* Fallback color */
    min-height: 200px; /* Ensure container has height while image loads */
}

.main-image img {
    width: 100%;
    height: auto;
    object-fit: cover; /* Maintain aspect ratio */
    transition: transform 0.3s ease;
    display: block; /* Remove extra space below image */
}

/* Thumbnail images styling */
.thumbnail-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    opacity: 0.8; /* Slightly dim non-active thumbnails */
    object-fit: cover; /* Maintain aspect ratio */
    aspect-ratio: 1/1; /* Make thumbnails square */
}

.thumbnail-images img:hover {
    opacity: 1;
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Ensure prices have no decimal places */
.current-price, .original-price, .total-amount, .quantity-selector select option {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove any potential decimal from dynamically updated content */
.total-amount {
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745;
    margin: 20px 0;
    padding: 15px;
    background: #f0f9f0;
    border-radius: 8px;
    text-align: center;
    animation: pulse 2s infinite;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    .main-image {
        min-height: 150px;
    }
    
    .thumbnail-images {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

@media screen and (max-width: 480px) {
    .main-image {
        min-height: 120px;
    }
    
    .thumbnail-images {
        gap: 5px;
    }
}