/* Product Detail Page Styles */

/* Product Image Container */
.product-image-container {
    position: relative;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: 600px;
}

.product-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Thumbnail Images */
.thumbnail-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #f9fafb;
    padding: 4px;
}

/* Size Variations Table */
.size-variations-table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.size-variations-table thead {
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
}

.size-variations-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #374151;
    padding: 12px 16px;
    border-bottom: 2px solid #e5e7eb;
}

.size-variations-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.size-variations-table tbody tr {
    transition: background-color 0.2s ease;
}

.size-variations-table tbody tr:hover {
    background-color: #f9fafb;
}

.size-variations-table tbody tr:last-child td {
    border-bottom: none;
}

/* Variant quantity controls */
.variant-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.variant-quantity-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.variant-quantity-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.variant-quantity-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.variant-quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.variant-quantity-input {
    width: 64px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 14px;
    font-weight: 500;
}

.variant-quantity-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.variant-quantity-input:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Stock indicators */
.stock-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.stock-indicator.in-stock {
    color: #059669;
}

.stock-indicator.out-of-stock {
    color: #d1d5db;
}

/* Price display in variants table */
.variant-price {
    font-weight: 700;
    font-size: 1rem;
    color: #3b82f6;
}

.variant-price-addition {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
}

/* Color swatch */
.color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    margin-left: 4px;
    vertical-align: middle;
}

/* Add to cart button for variants */
.add-variants-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.add-variants-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

/* Responsive design */
@media (max-width: 768px) {
    /* Product images on mobile */
    .product-image-container {
        min-height: 300px;
        max-height: 500px;
    }
    
    .size-variations-table {
        font-size: 0.875rem;
    }
    
    .size-variations-table th,
    .size-variations-table td {
        padding: 8px 12px;
    }
    
    .variant-quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .variant-quantity-input {
        width: 56px;
        padding: 4px 6px;
        font-size: 13px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .product-image-container {
        min-height: 250px;
        max-height: 400px;
    }
    
    .thumbnail-image {
        width: 56px;
        height: 56px;
    }
}

/* Table scroll hint for mobile */
@media (max-width: 640px) {
    .table-scroll-container {
        position: relative;
    }
    
    .table-scroll-container::after {
        content: '→';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        background: linear-gradient(to right, transparent, white);
        padding: 20px 10px;
        pointer-events: none;
        font-size: 1.5rem;
        color: #9ca3af;
    }
}
