
.quantity-discounts {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 16px;
    background-color: #f9f9f9;
}

.quantity-discounts h5 {
    margin-bottom: 15px;
    color: #333;
}

.quantity-discounts table {
    border-radius: 4px;
    overflow: hidden;
}

.quantity-discounts th, .quantity-discounts td {
    text-align: center;
    vertical-align: middle;
}

.quantity-discounts .badge {
    font-size: 0.9rem;
    padding: 5px 8px;
}

.table-success {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Thumbnail Styles */
.thumbnail-wrapper {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.thumbnail-wrapper.active {
    border-color: #000000;
}

.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}

/* Styles for new inventory system */
.color-item {
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.color-item:hover {
    border-color: #007bff;
    background-color: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.15);
}

.color-item.selected {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.color-item.unavailable {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Size Options */
.size-option {
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.size-option:hover {
    border-color: #007bff;
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.15);
}

.size-option.selected {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.25);
}

.size-option.unavailable {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Stock Indicators */
.stock-indicator {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.stock-high {
    background-color: #d4edda;
    color: #155724;
}

.stock-medium {
    background-color: #fff3cd;
    color: #856404;
}

.stock-low {
    background-color: #f8d7da;
    color: #721c24;
}

.stock-out {
    background-color: #f8f9fa;
    color: #6c757d;
}

.size-option-responsive {
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

.size-option.available:hover {
    border-color: #007bff;
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.size-option.available.selected {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.size-option.unavailable {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.size-option.unavailable:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* Additional Improvements */
.section-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.color-name {
    font-weight: 500;
}

.badge {
    font-size: 0.8rem;
}

.size-option .fw-bold {
    font-size: 1rem;
}

.text-muted {
    font-size: 0.85rem;
}

#availableColorsForSize {
    background-color: #f8f9ff;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(0, 123, 255, 0.1);
    margin-top: 20px;
}

#availableColorsForSize h6 {
    color: #007bff;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.stock-status-badge {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.stock-available {
    background-color: #d4edda;
    color: #155724;
}

.stock-low {
    background-color: #fff3cd;
    color: #856404;
}

.stock-out {
    background-color: #f8d7da;
    color: #721c24;
}

.variant-price {
    font-weight: 600;
    color: #007bff;
    font-size: 1rem;
}

.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

/* Basic and Clean Styles */
.size-option {
    transition: all 0.3s ease;
    border: 2px solid #e1e5e9;
    background: white;
}

.size-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.15);
    border-color: #007bff;
}

.size-option.selected {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-color: #007bff;
    transform: translateY(-3px);
}

.color-preview {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.color-preview:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* New Size Design - Simplified Radio Buttons */
.size-options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.size-radio-wrapper {
    position: relative;
}

.size-radio-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.size-radio-label {
    display: block;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.size-radio-label:hover:not(.disabled) {
    border-color: #007bff;
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.size-radio-wrapper input[type="radio"]:checked + .size-radio-label {
    border-color: #007bff;
    background-color: #007bff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}

.size-radio-wrapper input[type="radio"]:checked + .size-radio-label small {
    color: #fff !important;
}

.size-radio-label.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.size-radio-label.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* New Color Design - Radio Buttons */
.color-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.color-radio-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-radio-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-visual {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #e0e0e0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background-size: cover;
    background-position: center;
}

.color-visual::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s ease;
}

.color-radio-wrapper:hover .color-visual:not(.disabled) {
    transform: scale(1.1);
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-radio-wrapper input[type="radio"]:checked + .color-visual,
.color-radio-wrapper input[type="radio"]:checked ~ .color-visual {
    border-color: #007bff;
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.color-radio-wrapper input[type="radio"]:checked + .color-visual::after,
.color-radio-wrapper input[type="radio"]:checked ~ .color-visual::after {
    opacity: 1;
}

.color-visual.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
    position: relative;
}

.color-visual.disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.5) 2px,
        rgba(255, 255, 255, 0.5) 4px
    );
    border-radius: 50%;
}

.color-visual.disabled::after {
    content: '✕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dc3545;
    font-weight: bold;
    font-size: 12px;
    opacity: 1;
}

/* Disable interaction with disabled colors */
.color-radio-wrapper input[type="radio"]:disabled + .color-visual,
.color-radio-wrapper input[type="radio"]:disabled ~ .color-visual {
    pointer-events: none;
}

.color-radio-wrapper input[type="radio"]:disabled + .color-visual:hover,
.color-radio-wrapper input[type="radio"]:disabled ~ .color-visual:hover {
    transform: none;
    border-color: #e0e0e0;
    box-shadow: none;
}

.color-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.color-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.color-stock {
    font-size: 12px;
}

.color-price {
    font-weight: 600;
    color: #007bff;
    font-size: 13px;
}

/* Title Improvements */
.section-title {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.section-title i {
    color: #007bff;
}

/* Product Details Grid */
.product-details-grid {
    margin-top: 20px;
}

.detail-box {
    background: transparent;
    border: 2px solid rgba(0, 123, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
}

/* Hover effect removed for product details */

.detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 123, 255, 0.1);
}

.detail-icon {
    color: #007bff;
    font-size: 16px;
    margin-left: 8px;
    flex-shrink: 0;
}

.detail-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: capitalize;
}

.detail-value {
    color: #666;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Stock Badge Styles */
.stock-badge.in-stock {
    background-color: #28a745 !important;
    background: #28a745 !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    display: inline-block !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3) !important;
}

.stock-badge.out-of-stock {
    background-color: #dc3545 !important;
    background: #dc3545 !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    display: inline-block !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3) !important;
}

/* Ensure no style conflicts */
#productStockBadge.in-stock {
    background-color: #28a745 !important;
    background: #28a745 !important;
    color: white !important;
}

#productStockBadge.out-of-stock {
    background-color: #dc3545 !important;
    background: #dc3545 !important;
    color: white !important;
}

/* Additional style to ensure green color */
span.stock-badge.in-stock {
    background: #28a745 !important;
    background-color: #28a745 !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 10px !important;
    font-weight: bold !important;
    font-size: 14px !important;
    text-align: center !important;
    display: inline-block !important;
    border: 2px solid #28a745 !important;
    box-shadow: 0 3px 6px rgba(40, 167, 69, 0.4) !important;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet Styles */
@media (max-width: 768px) {
    .size-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }

    .size-option {
        padding: 12px 15px;
        min-width: 100px;
    }

    .color-item {
        padding: 12px;
        margin-bottom: 8px;
    }

    #availableColorsForSize {
        padding: 15px;
    }

    .product-price .amount {
        font-size: 1.5rem !important;
    }

    .size-options-container {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }

    .size-radio-label {
        padding: 10px 12px;
        min-height: 50px;
        font-size: 13px;
    }

    .color-visual {
        width: 36px;
        height: 36px;
    }

    .color-options-container {
        gap: 10px;
    }

    /* Mobile row improvements - Keep two items in same row */
    .row.align-items-center {
        margin-bottom: 0.5rem !important;
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .row.align-items-center .col-md-4 {
        margin-top: 0;
        flex: 1 !important;
        max-width: 50% !important;
        padding-left: 5px !important;
    }

    .row.align-items-center .col-md-8 {
        flex: 1 !important;
        max-width: 50% !important;
        padding-right: 5px !important;
    }

    /* Price adjustment on mobile */
    .product-price .amount {
        font-size: 1.8rem !important;
    }

    /* Stock status adjustment on mobile */
    .stock-badge {
        padding: 12px 18px !important;
        font-size: 16px !important;
    }

    /* Stock info alignment on medium devices */
    .stock-info {
        display: flex !important;
        justify-content: flex-end !important;
    }

    /* Mobile detail box improvements */
    .detail-box {
        padding: 15px;
        margin-bottom: 15px;
    }

    .detail-header {
        margin-bottom: 10px;
        padding-bottom: 6px;
    }

    .detail-label {
        font-size: 13px;
    }

    .detail-value {
        font-size: 14px;
    }
}

/* Mobile Styles */
@media (max-width: 576px) {
    .size-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .size-option {
        padding: 10px;
        min-width: auto;
    }

    .color-item {
        padding: 10px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .color-item .d-flex {
        flex-direction: column;
        gap: 8px;
    }

    .size-options-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .color-radio-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .color-info {
        align-items: center;
    }


    /* Force two items in same row on mobile with minimal spacing */
    .row.align-items-center {
        display: flex !important;
        flex-wrap: nowrap !important;
        margin-bottom: 0.25rem !important;
    }

    .row.align-items-center .col-md-8,
    .row.align-items-center .col-md-4 {
        flex: 1 !important;
        max-width: 50% !important;
        margin-bottom: 0 !important;
    }

    .row.align-items-center .col-md-8 {
        text-align: right !important;
        padding-right: 5px !important;
    }

    .row.align-items-center .col-md-4 {
        text-align: left !important;
        padding-left: 5px !important;
        margin-top: 0;
    }

    .product-title {
        font-size: 1.4rem !important;
        margin-bottom: 0.5rem !important;
    }

    .product-category {
        justify-content: flex-end !important;
    }

    .product-price {
        justify-content: flex-start !important;
    }

    .product-price .amount {
        font-size: 1.5rem !important;
    }

    .stock-info {
        text-align: right !important;
        justify-content: flex-end !important;
    }

    .product-details-grid .col-md-6 {
        margin-bottom: 10px;
    }

    .detail-box {
        padding: 12px;
        border-radius: 8px;
    }
}
