/* 
 * Car Rental Pro - Main Stylesheet
 */

@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');

.crp-search-container, 
.crp-pdp-booking, 
.crp-modal, 
.crp-branch-hub, 
.crp-search-notice, 
.flatpickr-calendar,
.crp-search-results,
.crp-results-page,
.crw-modal,
.crp-pdp-columns,
.crp-pdp-main,
.crp-pdp-sidebar {
    font-family: 'Almarai', sans-serif !important;
}

/* Results Page Styles */
.crp-results-page { width: 100%; max-width: none; margin: 0; padding: 24px 32px 64px; background: linear-gradient(180deg, #f8fafc 0%, #ffffff 240px); }
.crp-results-head { display: grid; gap: 18px; margin-bottom: 28px; }
.crp-results-title { margin: 0; color: #092332; font-size: 34px; font-weight: 800; }
.crp-results-subtitle { margin: 0; color: #5b6571; font-size: 15px; }
.crp-results-panel { background: #fff; border: 1px solid #e8edf2; border-radius: 20px; padding: 20px; box-shadow: 0 10px 30px rgba(9,35,50,.06); }
.crp-results-page .woocommerce ul.products { margin-top: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

/* Product Page Layout */
.crp-pdp-columns { display: flex; gap: 30px; margin-top: 30px; }
.crp-pdp-main { flex: 7; border: 1px solid #eee; padding: 25px; border-radius: 16px; background: #ffffff; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); }
.crp-pdp-sidebar { flex: 3; position: sticky; top: 100px; height: fit-content; }

/* Sidebar Summary */
.crp-summary-box { background: #fff; border: 1px solid #eee; border-radius: 16px; padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.crp-car-preview img { width: 100%; height: auto; border-radius: 10px; margin-bottom: 15px; box-shadow: none !important; }
.crp-car-info { text-align: start; margin-bottom: 25px; }
.crp-pdp-car-name { font-size: 20px; font-weight: 800; color: #092332; margin: 0; }
.crp-year { font-size: 14px; color: #888; font-weight: 600; }

.crp-summary-details { display: flex; flex-direction: column; gap: 15px; }
.crp-sum-group { border-bottom: 1px solid #f5f5f5; padding-bottom: 15px; }
.crp-sum-group.center { text-align: start; }
.crp-sum-group label { display: block; font-weight: 800; color: #999; font-size: 14px; margin-bottom: 8px; }
.crp-sum-val { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #C6A344; font-size: 14px; }
.crp-sum-val.location { margin-bottom: 8px; }
.crp-sum-sub { display: flex; justify-content: space-between; }
.crp-sum-sub .crp-sum-val { color: #777; font-size: 13px; font-weight: 700; }
.crp-sum-val.highlight { display: block; font-size: 18px; color: #C6A344; }
.crp-sum-val.highlight.gold { color: #C6A344; }

/* Add-ons List */
.crp-pdp-header { margin-bottom: 25px; }
.crp-pdp-title-row { display: flex; align-items: baseline; gap: 8px; font-weight: 800; font-size: 28px; }
.crp-pdp-title-row h3 { margin: 0; font-size: 28px; font-weight: 800; }
.crp-pdp-and { color: #C6A344; }
.crp-pdp-subtitle { border-bottom: 2px solid #ddd; padding-bottom: 12px; margin-bottom: 25px; color: #777; font-size: 15px; }

.crp-addon-wide-card { display: flex; align-items: center; background: #fff; border: 1px solid #ddd; border-radius: 12px; padding: 15px 25px; margin-bottom: 12px; cursor: pointer; transition: 0.3s; }
.crp-addon-wide-card:hover { border-color: #C6A344; background: #C6A344; box-shadow: 0px 0px 0px 7.26px #C6A34452; margin: 20px 0px; }  
.crp-addon-left { width: 150px; border-right: 1px solid #eee; text-align: end; }
.crp-addon-price-val { font-weight: 800; color: #333; }
.crp-addon-unit { font-size: 12px; color: #888; margin-right: 4px; }
.crp-addon-center { flex: 1; display: flex; gap: 12px; padding-right: 20px; flex-direction: row-reverse; justify-content: flex-end; }
.crp-addon-label { font-weight: 700; color: #555; }
.crp-addon-right { width: 40px; }

/* Custom Checkbox */
.crp-custom-check { position: relative; width: 22px; height: 22px; }
.crp-addon-checkbox { display: none; }
.crp-checkmark { position: absolute; inset: 0; border: 2px solid #ddd; border-radius: 4px; background: #fff; transition: 0.2s; }
.crp-addon-checkbox:checked + .crp-checkmark { background: #092332; border-color: #092332; }
.crp-checkmark:after { content: '✓'; position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); color: #fff; font-size: 14px; font-weight: bold; display: none; }
.crp-addon-checkbox:checked + .crp-checkmark:after { display: block; }

/* Pricing Table */
.crp-pricing-table { margin-top: 65px; border-radius: 12px; overflow: hidden; }
.crp-price-row { display: flex; justify-content: space-between; padding: 12px 20px; color: #fff; font-size: 16px; font-weight: 700; }
.crp-price-row.dark { background: #092332; }
.crp-price-row.semi-dark { background: #123A4D; }
.crp-price-row.delivery-row { background: #092332; }
.crp-price-row.darker { background: #092332; }
.crp-price-row.grey { background: #123A4D; }
.crp-price-row.grand { font-size: 20px; }

/* Buttons */
.crp-confirm-btn { width: 100%; padding: 18px; background: #C6A344; color: #092332; border: none; border-radius: 12px; font-weight: 800; font-size: 18px; cursor: pointer; transition: 0.3s; margin-top: 20px; box-shadow: 0px 0px 0px 7.26px #C6A34452; }
.crp-confirm-btn:hover { transform: translateY(-5px); background: #C6A344; color: #092332; box-shadow: 0px 0px 0px 7.26px #C6A34452; }

.crp-pdp-booking .woocommerce-Price-amount bdi { display: inline-flex !important; flex-direction: row !important; gap: 5px; align-items: baseline; }

@media (max-width: 767px) {
    .crp-hub-details {
        display: none !important;
    }
    .crp-branch-hub {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: transparent !important; 
        z-index: 999999 !important;
        display: none; 
        align-items: center !important;
        justify-content: center !important;
        padding: 15px !important;
        overflow: hidden !important;
        pointer-events: none !important; 
    }
    .crp-hub-content {
        pointer-events: auto !important;
        width: 100% !important;
        max-width: 380px !important;
        margin: auto !important; 
        background: #fff !important;
        border-radius: 24px !important;
        overflow: hidden !important;
        position: relative !important;
        box-shadow: 0 20px 60px rgba(0,0,0,0.2) !important;
        border: none !important;
        display: block !important;
    }
    .crp-hub-main {
        width: 100% !important;
        padding: 45px 20px 20px 20px !important;
        background: #fff !important;
        position: relative !important;
        border: none !important;
    }
    .crp-hub-close {
        position: absolute !important;
        top: 12px !important;
        right: 15px !important;
        background: #f0f0f0 !important;
        border: none !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        font-size: 22px !important;
        line-height: 32px !important;
        color: #092332 !important;
        cursor: pointer !important;
        z-index: 1000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }
    .crp-hub-list {
        max-height: 350px !important;
        overflow-y: auto !important;
        margin-top: 15px !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .crp-hub-item {
        color: #092332 !important;
        padding: 16px !important;
        border: none !important; /* حذف البوردر من العناصر */
        border-radius: 12px !important;
        font-weight: 700 !important;
        text-align: right !important;
        display: block !important;
        margin-bottom: 15px !important;
        transition: 0.2s !important;
        background: #f8f9fa !important; /* خلفية فاتحة جداً بدل البوردر */
    }
    .crp-hub-item:hover, .crp-hub-item.selected {
        background: #C6A344 !important;
        color: #fff !important;
        border-color: #C6A344 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(198, 163, 68, 0.2) !important;
    }
}

@media (max-width: 991px) {
    .crp-pdp-columns { flex-direction: column; }
    .crp-pdp-sidebar { position: static; order: -1; }
}

/* Hide WooCommerce Defaults */
.single-product form.cart .single_add_to_cart_button:not(#crw_confirm_booking), 
.single-product form.cart .quantity { 
    display: none !important; 
}
