/* KR Item Master Frontend Styles */

/* Price wrapper with unit below */
.krim-price-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}

.krim-price-wrapper .woocommerce-Price-amount {
    display: block;
}

.krim-price-unit {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: normal;
    margin-top: 2px;
    line-height: 1.2;
}

/* Unit Selector */
.krim-unit-selector {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.krim-unit-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.krim-unit-select {
    width: 100%;
    max-width: 280px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.krim-unit-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.krim-unit-select:hover {
    border-color: #999;
}

/* Product Details Box */
.krim-product-details {
    margin: 15px 0;
    padding: 15px 18px;
    background: linear-gradient(to right, #f8fdf8, #fff);
    border: 1px solid #e0e0e0;
    border-left: 4px solid #4CAF50;
    border-radius: 0 8px 8px 0;
}

.krim-detail-row {
    display: flex;
    align-items: baseline;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.krim-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.krim-detail-row:first-child {
    padding-top: 0;
}

.krim-detail-label {
    font-weight: 600;
    color: #333;
    min-width: 100px;
    margin-right: 10px;
}

.krim-detail-value {
    color: #555;
    flex: 1;
}

.krim-subcategory {
    color: #888;
    font-size: 13px;
}

/* Cart unit display */
.woocommerce-cart-form .krim-unit-display {
    font-size: 12px;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* Shop/Archive page price styling */
.woocommerce ul.products li.product .krim-price-wrapper {
    display: inline-flex;
    flex-direction: column;
}

.woocommerce ul.products li.product .krim-price-unit {
    font-size: 11px;
    margin-top: 3px;
}

/* Single product page specific */
.single-product .krim-price-wrapper .woocommerce-Price-amount {
    font-size: inherit;
}

.single-product .krim-price-unit {
    font-size: 13px;
    margin-top: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .krim-unit-select {
        max-width: 100%;
    }
    
    .krim-product-details {
        padding: 12px 15px;
    }
    
    .krim-detail-row {
        flex-direction: column;
        padding: 8px 0;
    }
    
    .krim-detail-label {
        margin-bottom: 3px;
    }
}

/* RTL Support */
[dir="rtl"] .krim-product-details {
    border-left: 1px solid #e0e0e0;
    border-right: 4px solid #4CAF50;
    border-radius: 8px 0 0 8px;
}

[dir="rtl"] .krim-unit-select {
    background-position: left 12px center;
    padding-left: 35px;
    padding-right: 12px;
}
