:root {
    --primary: #1e429f;
    --primary-dark: #0f2a6b;
    --secondary: #e53e3e;
    --accent: #f6ad55;
    --light: #f5f7fa;
    --dark: #1a202c;
    --gray: #718096;
    --light-gray: #e2e8f0;
    --white: #ffffff;
    --pink: #fbb6ce;
    --light-pink: #fed7e2;
    --success: #48bb78;
    --warning: #ed8936;
}

/* Product Page Styles */
.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Product Image Section */
.product-image-section {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.main-image {
    background: linear-gradient(135deg, var(--light) 0%, var(--white) 100%);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--light-gray);
}

.main-image img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

/* Product Details Section */
.product-details-section {
    padding: 0 1rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-description {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.price-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--light) 0%, #f0f4f8 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.current-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

/* Selection Groups */
.selection-group {
    margin-bottom: 2rem;
    padding: 2rem;
    border: 2px solid var(--light-gray);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.selection-group:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 25px rgba(30, 66, 159, 0.1);
}

.selection-group h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selection-group h3::before {
    content: '•';
    color: var(--primary);
    font-size: 1.5rem;
}

/* Option Buttons */
.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.option-btn {
    padding: 1rem 1.75rem;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    background: var(--white);
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.option-btn:hover::before {
    left: 100%;
}

.option-btn:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--light) 0%, #ebf8ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 66, 159, 0.15);
}

.option-btn.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 66, 159, 0.25);
}

.price-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: var(--success);
    color: var(--white);
}

.option-btn.active .price-change {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.option-btn .price-change.negative {
    background: var(--secondary);
}

/* Choice Sets */
.choice-sets .selection-group {
    background: linear-gradient(135deg, var(--light-pink) 0%, #fef5f7 100%);
    border-color: var(--pink);
}

.choice-sets .selection-group:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 25px rgba(229, 62, 62, 0.1);
}

/* Add to Cart Section */
.add-to-cart-section {
    margin-top: 2.5rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--light) 0%, #f0f4f8 100%);
    border-radius: 16px;
    border: 2px solid var(--light-gray);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--light-gray);
}

.quantity-selector label {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--light);
    border-radius: 10px;
    padding: 0.5rem;
}

.quantity-btn {
    width: 3rem;
    height: 3rem;
    border: none;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

#quantity {
    width: 5rem;
    height: 3rem;
    text-align: center;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--white);
}

#quantity:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 66, 159, 0.1);
}

.btn-add-to-cart {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-add-to-cart:hover::before {
    left: 100%;
}

.btn-add-to-cart:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(30, 66, 159, 0.4);
}

.btn-add-to-cart:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-add-to-cart:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-add-to-cart:disabled::before {
    display: none;
}

/* Product Summary */
.product-summary {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--light) 0%, #f0f4f8 100%);
    border-radius: 16px;
    border-left: 6px solid var(--success);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.product-summary h4 {
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-summary h4::before {
    content: '📦';
    font-size: 1.2rem;
}

.product-summary p {
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(113, 128, 150, 0.1);
}

.product-summary p:last-of-type {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--light-gray);
}

/* Responsive Design */
@media (max-width: 968px) {
    .product-page {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin: 1rem auto;
    }

    .product-image-section {
        position: static;
        max-width: 500px;
        margin: 0 auto;
    }

    .product-title {
        font-size: 2rem;
        text-align: center;
    }

    .option-buttons {
        justify-content: center;
    }

    .option-btn {
        min-width: 110px;
    }
}

@media (max-width: 768px) {
    .product-page {
        padding: 0 0.5rem;
    }

    .selection-group {
        padding: 1.5rem;
    }

    .add-to-cart-section {
        padding: 2rem 1.5rem;
    }

    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .quantity-controls {
        width: 100%;
        justify-content: center;
    }

    .product-title {
        font-size: 1.8rem;
    }

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

@media (max-width: 480px) {
    .option-buttons {
        gap: 0.75rem;
    }

    .option-btn {
        min-width: 90px;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .main-image {
        padding: 1.5rem;
    }

    .selection-group {
        padding: 1.25rem;
    }

    .add-to-cart-section {
        padding: 1.5rem 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--light-gray);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success Animation */
@keyframes success-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(72, 187, 120, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0);
    }
}

.success {
    animation: success-pulse 0.6s ease-in-out;
}

/* Selection Required Indicator */
.selection-required::after {
    content: '*';
    color: var(--secondary);
    margin-left: 4px;
}

/* Badge for New/Featured Products */
.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--warning) 100%);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(237, 137, 54, 0.3);
}


/* Customization Fields */
.customization-field {
    margin-bottom: 1.5rem;
}

.customization-field:last-child {
    margin-bottom: 0;
}

.customization-field label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

#name-on-product {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

#name-on-product:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 66, 159, 0.1);
}

#logo-upload {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--light-gray);
    border-radius: 8px;
    background: var(--light);
    transition: all 0.3s ease;
    cursor: pointer;
}

#logo-upload:hover {
    border-color: var(--primary);
    background: var(--white);
}

.field-hint {
    display: block;
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-style: italic;
}

/* File upload preview */
#logo-preview {
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    background: var(--white);
}

#preview-image {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* Number Field Styles */
.number-field-container {
    margin-bottom: 1.5rem;
}

.number-field-container label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

#player-number {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

#player-number:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 66, 159, 0.1);
}

/* Number validation styles */
.number-field-container.error #player-number {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.validation-error {
    color: var(--secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

.number-field-container.error .validation-error {
    display: block;
}
.option-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.option-btn.disabled:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}