/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.store-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.store-logo {
    font-size: 2rem;
    font-weight: bold;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Product Page */
.product-page {
    padding: 20px 0;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

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

/* Product Section */
.product-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Product Images */
.main-image img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail.active,
.thumbnail:hover {
    border-color: #667eea;
}

/* Product Info */
.product-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #333;
}

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

.stars {
    color: #ffc107;
    font-size: 1.2rem;
}

.rating-text {
    color: #6c757d;
}

/* Price Section */
.price-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.current-price {
    font-size: 2rem;
    font-weight: bold;
    color: #dc3545;
}

.original-price {
    font-size: 1.2rem;
    text-decoration: line-through;
    color: #6c757d;
}

.discount-badge {
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Main Product Options */
.main-product-options {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.main-product-options h3 {
    color: #667eea;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

/* Bundle Section */
.bundle-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.bundle-header {
    margin-bottom: 20px;
}

.bundle-header h3 {
    color: #28a745;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.bundle-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Bundle Items */
.bundle-products {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.bundle-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.bundle-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.bundle-item.selected {
    border-color: #28a745;
    background: #f8fff9;
}

/* Custom Checkbox */
.bundle-checkbox {
    position: relative;
}

.bundle-check {
    display: none;
}

.checkbox-label {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.bundle-check:checked + .checkbox-label {
    background: #28a745;
    border-color: #28a745;
}

.bundle-check:checked + .checkbox-label::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.bundle-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.bundle-details {
    flex: 1;
}

.bundle-name {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.bundle-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.bundle-original {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
}

.bundle-discounted {
    font-weight: bold;
    color: #dc3545;
    font-size: 1.1rem;
}

.bundle-discount {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-selector label {
    font-size: 0.9rem;
    color: #6c757d;
}

.qty-select {
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Bundle Summary */
.bundle-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.main-product {
    font-weight: bold;
    font-size: 1.1rem;
}

.selected-bundles .summary-row {
    color: #28a745;
    font-size: 0.95rem;
}

.summary-divider {
    height: 1px;
    background: #e9ecef;
    margin: 15px 0;
}

.total-savings {
    color: #28a745;
    font-weight: bold;
}

.total-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #dc3545;
    border-top: 2px solid #e9ecef;
    padding-top: 15px;
    margin-top: 10px;
}

/* Product Actions */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quantity-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    background: #f8f9fa;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.qty-btn:hover {
    background: #e9ecef;
}

#main-qty {
    border: none;
    padding: 8px 15px;
    text-align: center;
    width: 60px;
    font-size: 1rem;
}

.btn-add-cart,
.btn-buy-now {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart {
    background: #28a745;
    color: white;
}

.btn-add-cart:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-buy-now {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Product Features */
.product-features {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.product-features ul {
    list-style: none;
}

.product-features li {
    padding: 5px 0;
    color: #28a745;
    font-weight: 500;
}

/* Bundle Benefits */
.bundle-benefits {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.bundle-benefits h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: #333;
}

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

.benefit-item {
    text-align: center;
    padding: 20px;
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.benefit-item h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.2rem;
}

.benefit-item p {
    color: #6c757d;
    line-height: 1.5;
}

/* Footer */
.store-footer {
    background: #343a40;
    color: white;
    text-align: center;
    padding: 30px 0;
}

.store-footer a {
    color: #667eea;
    text-decoration: none;
}

.store-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .bundle-item {
        flex-direction: column;
        text-align: center;
    }
    
    .bundle-pricing {
        justify-content: center;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .price-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .product-actions {
        gap: 10px;
    }
    
    .quantity-section {
        justify-content: center;
    }
}

/* Animation for bundle selection */
.bundle-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bundle-item.selected {
    animation: selectPulse 0.5s ease-out;
}

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

/* Product Options Styles */
.product-options {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

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

.option-group:last-child {
    margin-bottom: 0;
}

.option-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 0.95rem;
}

.option-label.required::after {
    content: " *";
    color: #dc3545;
}

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

.color-option {
    position: relative;
    cursor: pointer;
}

.color-option input[type="radio"] {
    display: none;
}

.color-option-label {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-option input[type="radio"]:checked + .color-option-label {
    border-color: #667eea;
    transform: scale(1.1);
}

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

.color-option-text {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-option:hover .color-option-text,
.color-option input[type="radio"]:checked + .color-option-label + .color-option-text {
    opacity: 1;
}

/* Radio Options */
.radio-options {
    display: grid;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
    accent-color: #667eea;
}

.radio-option input[type="radio"]:checked {
    background: #667eea;
}

.radio-option.selected {
    border-color: #28a745;
    background: #f8fff9;
}

.radio-option-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.radio-option-label {
    font-weight: 500;
    color: #333;
}

.radio-option-price {
    font-size: 0.9rem;
    color: #dc3545;
    font-weight: 600;
}

.radio-option-price.negative {
    color: #28a745;
}

/* Select Options */
.select-option {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

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

/* Checkbox Options */
.checkbox-options {
    display: grid;
    gap: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-option:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.checkbox-option input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #667eea;
    transform: scale(1.2);
}

.checkbox-option.selected {
    border-color: #28a745;
    background: #f8fff9;
}

.checkbox-option-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-option-label {
    font-weight: 500;
    color: #333;
}

.checkbox-option-price {
    font-size: 0.9rem;
    color: #dc3545;
    font-weight: 600;
}

/* Option Price Indicators */
.price-adjustment {
    font-size: 0.85rem;
    font-weight: 600;
}

.price-adjustment.positive {
    color: #dc3545;
}

.price-adjustment.negative {
    color: #28a745;
}

.price-adjustment.neutral {
    color: #6c757d;
}

/* Expanded Bundle Item Layout */
.bundle-item.expanded {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
}

.bundle-item-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.bundle-item-main {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

/* Responsive Options */
@media (max-width: 768px) {
    .color-options {
        justify-content: center;
    }
    
    .radio-option-content,
    .checkbox-option-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .bundle-item-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bundle-item-main {
        justify-content: center;
        text-align: center;
    }
}