/* =============================================================================
   GROUPED PRODUCT LOT SYSTEM STYLES
   ============================================================================= */

.grouped-product-lot-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.grouped-products-main {
    flex: 1;
}

.grouped-product-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: #fff;
}

.product-header {
    margin-bottom: 1rem;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
}

.product-brand {
    font-size: 0.9rem;
    color: #666;
}

.product-content {
    display: flex;
    gap: 2rem;
}

.product-images {
    flex: 0 0 300px;
}

.main-image {
    margin-bottom: 1rem;
}

.main-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
}

.thumbnail {
    flex: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
}

.thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.product-details {
    flex: 1;
}

.product-lifespan {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.lifespan-icon {
    font-size: 1rem;
}

.product-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #555;
}

.product-configuration {
    margin-bottom: 1.5rem;
}

.variations_form {
    margin-bottom: 1rem;
}

.variations table {
    width: 100%;
    border-collapse: collapse;
}

.variations td {
    padding: 0.5rem 0;
    vertical-align: top;
}

.variations .label {
    width: 30%;
    font-weight: 500;
}

.variations .value select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.duration-selection {
    margin-top: 1rem;
}

.duration-selection label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.duration-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.duration-option {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}

.duration-option:hover {
    border-color: #ff69b4;
    color: #ff69b4;
}

.duration-option.active {
    border-color: #ff69b4;
    background: #ff69b4;
    color: #fff;
}

.quantity {
    margin: 1rem 0;
}

.quantity input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.add-to-lot-btn,
.remove-from-lot-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-to-lot-btn {
    background: #ff69b4;
    color: #fff;
}

.add-to-lot-btn:hover {
    background: #e55a9f;
}

.remove-from-lot-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.remove-from-lot-btn:hover {
    background: #e0e0e0;
}

.trash-icon {
    font-size: 1rem;
}

/* =============================================================================
   SIDEBAR STYLES
   ============================================================================= */

.lot-summary-sidebar {
    flex: 0 0 350px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.lot-summary-sidebar h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.lot-items {
    margin-bottom: 1.5rem;
}

.lot-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border: 1px solid #e0e0e0;
}

.item-image {
    flex: 0 0 60px;
}

.item-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #333;
}

.item-color {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.item-price {
    font-weight: 600;
    color: #ff69b4;
}

.remove-item-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.remove-item-btn:hover {
    background: #f0f0f0;
}

.lot-total {
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
    margin-bottom: 1.5rem;
}

.total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.total-label {
    color: #333;
}

.total-amount {
    color: #ff69b4;
}

.rent-lot-btn {
    width: 100%;
    padding: 1rem;
    background: #ff69b4;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.rent-lot-btn:hover:not(:disabled) {
    background: #e55a9f;
}

.rent-lot-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* =============================================================================
   RESPONSIVE STYLES
   ============================================================================= */

@media (max-width: 768px) {
    .grouped-product-lot-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .lot-summary-sidebar {
        flex: none;
        position: static;
        order: -1;
    }
    
    .product-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .product-images {
        flex: none;
    }
    
    .duration-options {
        flex-direction: column;
    }
    
    .duration-option {
        text-align: center;
    }
}

/* =============================================================================
   WOOCOMMERCE INTEGRATION STYLES
   ============================================================================= */

.single_variation_wrap {
    margin-top: 1rem;
}

.woocommerce-variation {
    margin-bottom: 1rem;
}

.woocommerce-variation-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff69b4;
}

.woocommerce-variation-availability {
    margin-top: 0.5rem;
}

.variations_button {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* =============================================================================
   LOADING STATES
   ============================================================================= */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ff69b4;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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