/**
 * Main CSS Structure
 * 
 * 1. General Layout Elements
 * 2. Checkout Styles
 * 3. Order Confirmation
 * 4. Product Archive/Listing
 * 5. Product Card Styling
 * 6. Product Loop Elements
 * 7. Pagination
 * 8. Single Product Page
 * 9. Product Features
 * 10. Account Pages
 * 11. Responsive Media Queries
 */

/* ---------- 1. GENERAL LAYOUT ELEMENTS ---------- */

.wc-block-components-sidebar-layout {
    display: flex;
    gap: 2.5%;
    justify-content: space-between;
}

/* ---------- 2. CHECKOUT STYLES ---------- */

.wc-block-checkout__main, 
.wc-block-checkout__sidebar, 
.wc-block-cart__main, 
.wc-block-cart__sidebar {
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    padding: 20px !important;
    margin: 0 0 20px !important;
    background-color: #FFFFFF;
    box-shadow: 0px 8px 16px rgba(17,24,39,.06) !important;
    margin-bottom: 15px !important;
}

.wp-block-woocommerce-checkout-order-summary-block {
    border: none !important;
}

.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title {
    font-size: 20px !important;
    margin-top: 5px !important;
}

.wc-block-components-form .wc-block-components-text-input input, 
.wc-blocks-components-select .wc-blocks-components-select__select {
    border-color: #d1d5db !important;
}

.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted, 
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
    border-radius: 10px !important;
    box-shadow: inset 0 0 0 1.5px #49d611 !important;
}

.wc-block-components-radio-control--highlight-checked:after {
    border-radius: 10px !important;
}

.wc-block-components-product-details.wc-block-components-product-details li:first-child {
    display: none !important;
}

.wc-block-components-order-summary {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.wc-block-components-order-summary-item {
    flex-direction: column;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__description {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__image {
    margin-top: 0 !important;
    padding: 10px !important;
    width: 100% !important;
    text-align: center;
    margin-bottom: 15px;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__image > img {
    width: 100% !important;
    max-width: fit-content !important;
    height: auto !important;
}

.wc-block-components-order-summary-item__total-price, 
.wc-block-components-order-summary-item__individual-prices, 
.wc-block-components-order-summary .wc-block-components-order-summary-item__quantity {
    display: none !important;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__description .wc-block-components-product-metadata {
    line-height: 1.6 !important;
    font-size: 16px !important;
}

.wp-block-woocommerce-checkout-order-summary-totals-block, 
.css-0.e19lxcc00, 
.wc-block-components-quantity-selector, 
.wc-block-components-quantity-selector input, 
.wp-block-woocommerce-cart-order-summary-totals-block {
    display: none !important;
}

.wc-block-cart table.wc-block-cart-items {
    margin: 0 !important;
    border-bottom: none !important;
}

/* Custom Checkout Layout */
.ygc-checkout-container {
    display: flex;
    gap: 20px;
}

.ygc-checkout-container .ygc-container {
    padding: 30px;
}

.ygc-customer-details {
    width: 60%;
}

.ygc-order-review {
    width: 40%;
}

.ygc-checkout-image {
    text-align: center;
    margin-bottom: 30px;
}

.woocommerce-page.woocommerce-checkout form #order_review, 
.woocommerce-page.woocommerce-checkout form #order_review_heading {
    padding: 0 0 20px !important;
    border: none !important;
}

/* ---------- 3. ORDER CONFIRMATION ---------- */

.woocommerce-order ul.order_details {
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    padding: 20px;
    background-color: #FFFFFF;
    box-shadow: 0px 8px 16px rgba(17,24,39,.06) !important;
    margin-bottom: 15px !important;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-direction: column;    
}

.woocommerce-order ul.order_details li {
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    line-height: inherit;
}

.woocommerce-order-details {
    overflow-x: auto;
}

.woocommerce-order-details h2, 
.woocommerce-customer-details h2 {
    border: none !important;
    padding: 5px 0 20px !important;
    background: transparent !important;
}

.woocommerce-order-details td, 
.woocommerce-order-details th {
    border-color: rgba(17,24,39,.06) !important;
}

.woocommerce-order-details, 
.woocommerce-customer-details {
    box-shadow: 0px 8px 16px rgba(17,24,39,.12) !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    background: #fff;
    padding: 20px !important;
    line-height: 28px;
}

.woocommerce-order-details .wc-item-meta {
    padding: 0;
}

.woocommerce-order-details table.shop_table, 
.woocommerce-customer-details address {
    border: none !important;
    border-top: 1px solid #ddd !important;
}

.woocommerce-order-details table.shop_table {
    width: 100%;
    min-width: 440px;
}

.woocommerce-order-details table.shop_table a {
    font-weight: 600;
}

.woocommerce-order .woocommerce-notice {
    font-size: 22px;
    font-weight: 500;
}

/* ---------- 4. PRODUCT ARCHIVE/LISTING ---------- */

.rental-cars-container {
    width: 100%;
    margin-top: 30px;
    margin-bottom: 30px;
}

.rental-cars-content {
    display: flex;
    flex-direction: column-reverse;
    gap: 20px;
}

.rental-cars-list > ul {
    margin-left: 0px;
}

.rental-cars-list, 
.rental-cars-sidebar {
    width: 100%;
    min-width: 260px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
    clear: both;
    width: 100%;
}

/* ---------- 5. PRODUCT CARD STYLING ---------- */

.custom-product-card {
    justify-content: flex-end;
    position: relative;
    text-align: center !important;
    transition: transform .45s ease-out;
}

.custom-product-card:hover {
    transform: translateY(-6px);
}

.custom-product-card img {
    box-shadow: none !important;
}

.custom-product-card-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #2abe39;
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 21px;
    height: 42px;
    line-height: 18px;
    font-size: 14px;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
    min-width: 60%;
    margin: 0 auto 5px;
    text-transform: uppercase;
}

.custom-product-card-button:hover {
    color: #cdff00;
}

.custom-product-card-button:after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    cursor: pointer;
}

.custom-product-card.unavailable {
    opacity: 0.6;
}

.unavailable-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgb(255 192 192 / 80%);
    color: #900000;
    text-align: center;
    padding: 15px 20px 20px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 0 0 10px 10px;
}

.unavailable-overlay h5 {
    color: #900000;
    font-weight: bold;
    border-top: 1px solid #ff8686;
    padding-top: 15px;
    margin-top: 15px;
    text-transform: uppercase;
}

.unavailable-message-box p {
    margin: 5px 0;
}

/* ---------- 6. PRODUCT LOOP ELEMENTS ---------- */

/* Loop Title */
.loop-title {
    margin-top: 5px !important;
    margin-bottom: 20px !important;
    font-weight: 500;
    font-size: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loop Features */
.loop-feature-list {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.loop-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 25%;
    font-size: 12px;
}

.loop-feature-icon img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
    margin: 0 auto 3px !important;
}

.loop-feature-item div {
    font-size: 12px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

/* Loop Price List */
.loop-price-list {
    border-top: 1px solid #e8e8e8;
    padding-top: 10px;
    margin-bottom: 20px;
}

.loop-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.loop-price-duration, 
.loop-price-cost {
    font-size: 14px;
    color: #333;
}

/* ---------- 7. PAGINATION ---------- */

.ygc-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.ygc-pagination .nav-links {
    display: flex;
    gap: 8px;
    padding: 10px;
}

.ygc-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0px 8px 16px rgba(17,24,39,.06) !important;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: all 0.3s ease;
}

.ygc-pagination .page-numbers:hover, 
.ygc-pagination .next:hover {
    background: #f8f8f8;
    border-color: rgba(0, 0, 0, 0.2);
}

.ygc-pagination .page-numbers.current {
    background: #046bd2;
    color: #ffffff;
    border-color: #046bd2;
    cursor: default;
    box-shadow: 0px 8px 16px rgba(17,24,39,.06) !important;
}

.ygc-pagination .next {
    color: #046bd2;
    border-color: #e8e8e8;
}

/* ---------- 8. SINGLE PRODUCT PAGE ---------- */

.custom-product-container-1 {
    width: 100%;
    margin-bottom: 30px;
    overflow: auto;
}

.custom-col-1 {
    width: 60%;
    float: left;
}

.custom-col-2 {
    width: 40%;
    float: right;
    padding-left: 30px;
}

.custom-col-3 {
    width: 60%;
    float: left;
}

/* Product Image & Gallery */
.woocommerce-product-gallery {
    width: 100%;
    margin-bottom: 35px;
}

.woocommerce-product-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.woocommerce-product-gallery .flex-control-nav {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}

.woocommerce-product-gallery .flex-control-nav li {
    width: 20%;
    margin-right: 5px;
    margin-bottom: 5px;
}

.woocommerce-product-gallery .flex-control-nav li:last-child {
    margin-right: 0;
}

.woocommerce-product-gallery .flex-control-nav img {
    width: 100%;
    height: auto;
    display: block;
}

/* Page Components */
.product-features h3, 
.product-description h3, 
.product-info-custom h3, 
.add-to-cart h3 {
    font-size: 22px;
    font-weight: 600;
}

.product-features h3, 
.product-description h3, 
.product-info-custom h3 {
    margin-bottom: 20px;
}

.product-features,
.add-to-cart, 
.product-description, 
.product-info-custom {
    padding: 20px 25px !important;
    margin-bottom: 25px !important;
}

/* Product Price */
.product-price .amount {
    font-weight: 600;
    font-size: 22px;
    color: #10bd1d;
}

/* Product Price List */
.product-price-list {
    background-color: #f5f5f5;
    border-radius: 6px;
    padding: 5px 25px !important;
    margin-bottom: 35px;
}

.product-price-list ul {
    margin: 0;
}

.product-price-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #ddd;
}

.product-price-list li:first-child {
    border: none;
}

.price-duration {
    text-align: left;
    flex: 1;
}

.price-cost {
    text-align: right;
    flex: 1;
    font-weight: 600;
}

/* Product Form */
.single-product-book-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.single-product-book-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    margin-right: 6px;
}

.single-product-book-name {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.woocommerce-js .cart {
    margin-top: 10px;
}

/* Terms and Conditions */
.ygc-terms ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.ygc-terms ul li {
    position: relative;
    padding-left: 30px;
}

.ygc-terms ul li::before {
    content: "\f147";
    font-family: 'Dashicons';
    position: absolute;
    left: -4px;
    top: 1px;
    font-size: 28px;
    color: #f80909;
}

/* Related Products */
.custom-product-container-2 .related h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ---------- 9. PRODUCT FEATURES ---------- */

.product-features h3 {
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(188px, 1fr));
    row-gap: 10px;
    column-gap: 10px;
    padding: 0;
    list-style: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 0 10px;
}

.feature-item {
    display: flex;
    justify-content: flex-start;
    border-radius: 6px;
    text-align: center;
    min-height: 34px;
    white-space: nowrap;
    align-items: center;
}

.feature-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.feature-item span {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

/* ---------- 10. ACCOUNT PAGES ---------- */

.woocommerce-MyAccount-navigation > ul {
    padding-left: 0;
}

body .woocommerce-MyAccount-navigation-link:first-child {
    overflow: hidden;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

body .woocommerce-MyAccount-navigation-link:last-child {
    overflow: hidden;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

body .woocommerce-MyAccount-navigation-link a {
    padding: 10px 20px;
}

body .woocommerce-MyAccount-navigation-link.is-active a {
    background-color: #f5f5f5;
}

.woocommerce-js table.my_account_orders {
    border-radius: 8px !important;
    overflow: hidden;
}

.woocommerce-Address-title {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 15px !important;
}

.woocommerce-MyAccount-content address {
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.woocommerce-MyAccount-content .form-row input.input-text {
    border-radius: 6px;
    height: 46px !important;
}

.woocommerce-js form .form-row input.input-text, 
.woocommerce-js form .form-row textarea {
    border-radius: 6px;
}

/* ---------- 11. RESPONSIVE MEDIA QUERIES ---------- */

@media (min-width: 750px) {
    .wc-block-checkout__main, 
    .wc-block-components-sidebar-layout .wc-block-components-main {
        width: 60% !important;
    }
    
    .wc-block-components-sidebar, 
    .is-large.wc-block-cart .wc-block-components-sidebar {
        width: 37.5% !important;
    }
}

@media (min-width: 768px) {
    .woocommerce-order ul.order_details {
        flex-direction: row;
    }
    
    .woocommerce-order ul.order_details li {
        border-right: 1px solid #d1d5db;
    }
    
    .rental-cars-content.sidebar-left {
        flex-direction: row-reverse;
    }
    
    .rental-cars-content.sidebar-right {
        flex-direction: row;
    }
    
    .rental-cars-content.sidebar-left .rental-cars-list, 
    .rental-cars-content.sidebar-right .rental-cars-list {
        width: 75%;
    }
    
    .rental-cars-content.sidebar-left .rental-cars-sidebar, 
    .rental-cars-content.sidebar-right .rental-cars-sidebar {
        width: 25%;
        max-width: 300px;
    }
}

@media (min-width: 922px) {
    .woocommerce.woocommerce-checkout form #order_review, 
    .woocommerce.woocommerce-checkout form #order_review_heading, 
    .woocommerce-page.woocommerce-checkout form #order_review, 
    .woocommerce-page.woocommerce-checkout form #order_review_heading, 
    .woocommerce.woocommerce-checkout form #customer_details.col2-set, 
    .woocommerce-page.woocommerce-checkout form #customer_details.col2-set {
        width: 100% !important;
        float: none !important;
    }
}

@media (max-width: 768px) {
    .custom-col-1, 
    .custom-col-2, 
    .custom-col-3 {
        padding: 0;
        width: 100%;
        float: none;
        clear: both;
    }
    
    .woocommerce-product-gallery .flex-control-nav li {
        width: 25%;
    }
    
    .product-features, 
    .add-to-cart, 
    .product-description, 
    .product-info-custom {
        padding: 20px !important;
    }
    
    .product-features h3, 
    .product-description h3, 
    .product-info-custom h3, 
    .add-to-cart h3 {
        font-size: 18px;
    }
    
    .feature-list {
        grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
    }
}

@media (max-width: 480px) {
    .woocommerce-product-gallery .flex-control-nav li {
        width: 33.33%;
    }
}