/**
 * Magasin JCD Sync - Frontend Styles
 * Styles for the shortcode display
 */

/* Main Container */
.magasin-jcd-display {
    width: 100%;
    margin: 20px 0;
   
}

.magasin-jcd-container {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Responsive Layout */
@media (max-width: 992px) {
    .magasin-jcd-container {
        grid-template-columns: 1fr;
    }
}

/* Columns */
.magasin-jcd-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Section Styles */


.magasin-jcd-section-title {
    margin: 0 0 20px 0;
    font-size: 26px;
    font-weight: var(--e-global-typography-primary-font-weight) !important;
    margin: 0;
    color: var(--e-global-color-primary);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.magasin-jcd-count {
    font-size: 18px;
    color: #7f8c8d;
    font-weight: 400;
}

/* Statistics */
.magasin-jcd-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #555;
}

.stat-item strong {
    font-size: 18px;
    font-weight: 600;
}

.stat-active strong {
    color: #27ae60;
}

.stat-inactive strong {
    color: #e74c3c;
}

/* Products List */
.magasin-jcd-products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 10px;
}

.magasin-jcd-products-list::-webkit-scrollbar {
    width: 8px;
}

.magasin-jcd-products-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.magasin-jcd-products-list::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.magasin-jcd-products-list::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Accordion Item */
.accordion-item {
    margin-bottom: 10px;
}

.container_titre.card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.container_titre.card:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.accordion-item.selected .container_titre.card,
.container_titre.card.active {
    background: #1e3a5f;
    color: #ffffff;
    border-color: #1e3a5f;
}

.accordion-item.selected .container_titre.card:hover,
.container_titre.card.active:hover {
    background: #152d47;
}

.accordion_button:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.accordion_button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.container_titre.card.active .accordion_button {
    background: #ffffff;
    color: #1e3a5f;
}

.accordion_button svg {
    transition: transform 0.3s ease;
}



/* Accordion Content */
.accordion-content {
    display: none;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -8px;
}

.accordion-content.active {
    display: block;
}

.accordion-content p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: #495057;
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

/* Product Meta Info */
.product-meta-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.product-meta-info p {
    margin: 8px 0;
    font-size: 14px;
}

.product-meta-info strong {
    color: #2c3e50;
    margin-right: 5px;
}

/* Product Status */
.product-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Product Pricing */
.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 12px 0;
    font-size: 16px;
    color: #2c3e50;
}

.product-pricing strong {
    font-size: 14px;
}

.price-range {
    color: #e74c3c;
    font-weight: 600;
}

.price-single {
    color: #27ae60;
    font-weight: 600;
}

.price-unit {
    font-size: 14px;
    font-weight: 400;
    color: #7f8c8d;
}

/* Cart Content / Volume Selector */
.cart-content {

}

.cart-content h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

#volume-selector-container {
    margin-bottom: 10px;
}

.no-product-selected {
    padding: 20px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
    text-align: center;
    color: #6c757d;
}

.volume-selector {
    margin: 15px 0;
}

.volume-select-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-select-input:hover {
    border-color: #adb5bd;
}

.volume-select-input:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

/* Quantity Selector */
#quantity-selector-container {
    margin-top: 20px;
}

#quantity-selector-container h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.quantity-select-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-select-input:hover {
    border-color: #adb5bd;
}

.quantity-select-input:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

/* Order Summary */
#order-summary {
    margin-top: 30px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-item:last-of-type {
    border-bottom: none;
}

.summary-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.summary-icon svg {
    width: 18px;
    height: 18px;
    color: #1e3a5f;
}

.summary-item span {
    font-size: 15px;
    font-weight: 500;
    color: #2c3e50;
}

.price-section {
    margin-top: 20px;

   
}

.price-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    font-size: 15px;
    border-bottom: 1px solid #818181;
}

.price-row.eco-part {
    font-size: 13px;
    color: #6c757d;
}

.price-row.total {

    font-size: 18px;
    font-weight: 700;
}

.price-label {
    color: #2c3e50;
}

.price-value {
    color: #1e3a5f;
    font-weight: 600;
}

.price-row.total .price-value {
    font-size: 22px;
    font-weight: 700;
}

.add-to-cart-btn {
    width: 100%;
    margin-top: 20px;
    padding: 10px 20px;
    background: #1a3a4a;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
}



.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#cart-message {
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

#cart-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#cart-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#selected-product-info {
    margin-top: 20px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 4px;
}

.product-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-summary strong {
    color: #2c3e50;
    font-size: 16px;
}

.product-summary span {
    color: #1e3a5f;
    font-size: 18px;
    font-weight: 700;
    text-align: right;
    line-height: 1.4;
}

.product-summary span small {
    display: block;
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
    margin-top: 2px;
}

/* Details Section */
.details-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #7f8c8d;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
}

.detail-value.status-active {
    color: #27ae60;
}

.detail-value.status-inactive {
    color: #e74c3c;
}

.detail-value.status-maintenance {
    color: #f39c12;
}

.detail-description .detail-value {
    line-height: 1.6;
}

.detail-address .detail-value {
    line-height: 1.5;
}

/* Schedules Section */
.schedules-content {
    font-size: 14px;
    line-height: 1.8;
    color: #2c3e50;
}

.schedules-content strong {
    color: #3498db;
    font-weight: 600;
}

/* No Data Message */
.magasin-jcd-no-data {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-style: italic;
}

/* Error Message */
.magasin-jcd-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin: 20px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .magasin-jcd-section {
        padding: 15px;
    }
    
    .magasin-jcd-section-title {
        font-size: 20px;
    }
    
    .container_titre.card {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .accordion_button {
        width: 32px;
        height: 32px;
    }
    
    .accordion-content {
        padding: 15px;
    }
    
    .product-pricing {
        font-size: 14px;
    }
    
    .magasin-jcd-stats {
        flex-direction: column;
        gap: 10px;
    }
}
