/* ==========================================
   1. VARIABLES & RESET
   ========================================== */
:root {
    --primary: #015298;
    --secondary: #b02a23;
    --yellow: #ffd500;
    --dark: #222222;
    --light: #f7f7f7;
}

body {
    font-family: 'Segoe UI', sans-serif;
}

/* ==========================================
   1b. UNIFIED FORM CONTROL SIZING
   Ensures labels, inputs, selects and textareas render at the same
   font size across all TioB2C pages (Login, Registration, Checkout,
   Payment, Addresses, AccountDetails, etc.), regardless of page-specific
   CSS or Bootstrap size modifiers (form-control-lg / form-select-lg).
   ========================================== */
label,
.form-label {
    font-size: .9rem;
}

.form-control,
.form-select,
.form-control-lg,
.form-select-lg {
    font-size: .95rem;
}

/* ==========================================
   2. GLOBAL BUTTONS 
   ========================================== */
.department-btn, .search-btn, .add-cart-btn, .shop-btn, .vehicle-btn, .btn-search {
    border: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.department-btn, .search-btn, .add-cart-btn, .shop-btn {
    background: var(--primary);
    color: #fff;
}

    .department-btn:hover, .search-btn:hover, .add-cart-btn:hover, .shop-btn:hover {
        background: #1972bf;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(1, 82, 152, 0.3);
    }


    .department-btn:active, .search-btn:active, .add-cart-btn:active, .shop-btn:active, .vehicle-btn:active, .btn-search:active {
        transform: translateY(0);
        box-shadow: none;
    }

/* ==========================================
   3. HEADER & NAVBAR
   ========================================== */
.logo {
    font-size: 42px;
    font-weight: 800;
}

    .logo .orange {
        color: var(--primary);
    }

.navbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    min-height: 70px;
}

.navbar-nav .nav-link {
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 18px !important;
    transition: all .3s ease;
}

    .navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
        color: var(--primary);
    }

.account-cart {
    display: flex;
    align-items: center;
    gap: 20px;
}

.account-link, .cart-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all .3s ease;
}

    .account-link:hover, .cart-link:hover {
        color: var(--primary);
    }

    .account-link i, .cart-link i {
        font-size: 18px;
    }

/* Wraps the cart icon so the count bubble (.cq) can be positioned
   relative to just the icon, at its top-right corner. */
.cart-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Cart item-count bubble, anchored to the top-right of the cart icon. */
.cq {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 50%;
    background: var(--secondary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}

    /* Hide the bubble entirely when empty (cart count is 0) instead of
       showing an empty circle. */
    .cq:empty {
        display: none;
    }

/* ==========================================
   SEARCH STRIP (shared across all pages via _Layout.cshtml)
   ========================================== */
.search-strip {
    background: #f4f4f4;
    padding: 15px 0;
}

.department-btn, .vehicle-btn {
    height: 50px;
}

/* Ensure vehicle button text stays on one line and gracefully truncates */
.vehicle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* space between icon and text */
    white-space: nowrap; /* prevent wrapping to multiple lines */
    overflow: hidden; /* hide overflow when text too long */
    text-overflow: ellipsis; /* show ellipsis for overflow */
    padding: 0 12px; /* keep some horizontal padding */
    box-sizing: border-box;
    background: var(--secondary);
    color: #fff;
}

/* Slight adjustment on very small screens */
@media (max-width: 576px) {
    .vehicle-btn {
        gap: 6px;
        padding: 0 8px;
        font-size: 0.92rem;
    }
}

    .vehicle-btn:hover {
        background: #b93935;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(229, 57, 53, 0.35);
    }

.search-box {
    display: flex;
    width: 100%;
}

    .search-box input {
        flex: 1;
        min-width: 0;
        height: 50px;
        border-radius: 0;
        margin-right: 20px;
    }

.search-btn {
    flex: 0 0 140px;
    width: 140px;
    height: 50px;
}


/* ==========================================
    FOOTER
   ========================================== */
.site-footer {
    background: #1e1e1e;
    color: #ccc;
}
    .site-footer .container {
        padding-top: 20px;        
    }
    .site-footer .footer-bottom {
        padding-bottom: 20px;
        background: var(--secondary);
        text-align: center;
        color: #fff;
        font-size: 14px;
    }

    .site-footer h5 {
        color: #fff;
        margin-bottom: 20px;
        font-weight: 700;
    }

    .site-footer p {
        color: #aaa;
        line-height: 1.8;
    }

.footer-links, .footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .footer-links li, .footer-contact li {
        margin-bottom: 12px;
    }

    .footer-links a, .footer-contact a {
        color: #ffffff;
        text-decoration: none;
        transition: all .3s ease;
    }

        .footer-links a:hover, .footer-contact a:hover {
            color: var(--primary);
        }

    .footer-contact i {
        color: var(--primary);
        margin-right: 10px;
    }

/* ==========================================
   SWEETALERT2 CUSTOM STYLING (cart add/error dialogs)
   ========================================== */
.tio-swal-popup {
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

/* Shrinks the default (rather large) SweetAlert2 icon down to a size that
   feels proportional inside our smaller, compact popup. IMPORTANT: the icon's
   checkmark/x-mark lines are built from absolutely-positioned pseudo-elements
   sized relative to the icon's own width/height, so overriding width/height
   directly breaks/distorts the shape. Using transform: scale() shrinks the
   whole icon (including its pseudo-elements) proportionally, keeping it intact. */
.tio-swal-icon-sm {
    transform: scale(0.7);
    margin-top: .5em !important;
    margin-bottom: .25em !important;
}

.tio-swal-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--dark);
    padding: 0 .5em;
}

.tio-swal-confirm-btn {
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    padding: .5em 1.75em !important;
}

    .tio-swal-confirm-btn:hover {
        background: var(--secondary) !important;
    }

/* ---- Add-to-cart success dialog (Product Detail page) ----
   Two equal-width action buttons ("View Cart" / "Continue Shopping"),
   laid out full-width and stacked with consistent spacing so neither
   button visually dominates the other. */
.tio-swal-cart-popup {
    padding-bottom: 1.75rem !important;
}

.tio-swal-cart-actions {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    width: 100%;
    margin-top: .5rem !important;
}

.tio-swal-cart-btn {
    width: 100%;
    margin: 0 !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: .95rem !important;
    padding: .75em 1.5em !important;
    box-shadow: none !important;
}

.tio-swal-cart-btn-primary {
    order: 1;
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
}

    .tio-swal-cart-btn-primary:hover {
        background: var(--secondary) !important;
    }

.tio-swal-cart-btn-secondary {
    order: 2;
    background: #fff !important;
    color: var(--dark) !important;
    border: 1px solid var(--light) !important;
}

    .tio-swal-cart-btn-secondary:hover {
        background: var(--light) !important;
    }
.checkout-page {
    padding: 10px 0 30px;
    background: var(--light);
    min-height: 60vh;
}
.cart-page {
    padding: 10px 0 30px;
    background: var(--light);
    min-height: 60vh;
}
.checkout-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 14px;
}

/* ---- Breadcrumb (same visual pattern as cart.css / Product.cshtml's
   .pd-breadcrumb, duplicated here so checkout.css stays self-contained) ---- */
.cart-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 14px;
}

.breadcrumb {
    color: #666;
    font-size: 1rem;
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease;
}

    .breadcrumb a,
    .breadcrumb .breadcrumb-current {
        color: #666;
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
        transition: color .2s ease;
    }

        .breadcrumb a:hover {
            color: var(--primary);
            text-decoration: underline;
        }

    .breadcrumb .breadcrumb-sep {
        color: #bbb;
        margin: 0 8px;
        font-weight: 400;
        font-size: 1rem;
    }

    .breadcrumb .breadcrumb-current:last-child {
        /*color: var(--primary);*/
        font-weight: 700;
    }


.checkout-signin-note {
    font-size: .95rem;
    color: #444;
    margin-bottom: 24px;
}

.checkout-signin-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

    .checkout-signin-link:hover {
        text-decoration: underline;
    }

.checkout-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.checkout-form-col {
    flex: 1 1 auto;
    min-width: 0;
}

.checkout-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkout-full-width {
    grid-column: span 2;
}

.checkout-grid .form-group {
    display: flex;
    flex-direction: column;
}

.checkout-submit-btn {
    display: none;
}

.checkout-summary {
    flex: 0 0 300px;
    max-width: 300px;
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 4px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

    .checkout-summary h3 {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 2px solid #eee;
    }

.checkout-summary-header {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.checkout-summary-item {
    align-items: flex-start;
    font-size: .85rem;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f2f2;
    margin-bottom: 8px;
}

.checkout-summary-item-name {
    max-width: 65%;
    text-transform: uppercase;
    color: #444;
}

.checkout-summary-item-qty {
    color: #444;
    white-space: nowrap;
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: .95rem;
    color: #444;
}

.checkout-shipping-row span:last-child {
    color: #666;
}

.checkout-summary-total {
    border-top: 1px solid #eee;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary);
}

.checkout-place-order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    margin-top: 16px;
    border-radius: 4px;
    border: 1px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

    .checkout-place-order-btn:hover {
        background: var(--secondary);
        color: #fff;
    }

@media (max-width: 991px) {
    .checkout-layout {
        flex-direction: column;
        gap: 16px;
    }

    .checkout-summary {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
        position: static;
    }
}

@media (max-width: 480px) {
    .checkout-page {
        padding: 20px 0 40px;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-full-width {
        grid-column: span 1;
    }
}
