/* ============================================================
   AUTOLINK Main Redesign CSS (KS-Rentcar / Autodream Reference Style)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --ks-navy: #082A66;
    --ks-navy-dark: #04193D;
    --ks-navy-light: #0d3b8c;
    --ks-red: #E02838;
    --ks-red-dark: #c01e2c;
    --ks-orange: #ff9800;
    --ks-purple: #1e4570;
    --ks-gray-bg: #f2f3f6;
    --ks-card-bg: #f9f9fb;
    --ks-text-main: #333333;
    --ks-text-sub: #777777;
    --ks-text-muted: #939393;
    --ks-border: #ebebeb;
    --ks-radius-lg: 16px;
    --ks-radius-md: 10px;
    --ks-radius-sm: 6px;
    --ks-max-w: 1280px;
    --ks-font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base Reset for Redesign */
.al-wrap {
    font-family: var(--ks-font);
    color: var(--ks-text-main);
    background: #ffffff;
    line-height: 1.5;
}

.al-wrap *, .al-wrap *::before, .al-wrap *::after {
    box-sizing: border-box;
}

.al-container,
.w_inner,
.inner,
.est_wrapper,
.bo_rent_list,
.v_container,
.instant_page_wrap .w_inner,
.event_page_wrap .w_inner,
.sp_page_wrap .w_inner {
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* ============================================================
   HEADER & TOP SEARCH BAR
   ============================================================ */
.al-header-area {
    background: #ffffff;
    border-bottom: 1px solid var(--ks-border);
}

.al-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    max-width: var(--ks-max-w);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.al-header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.al-header-logo img {
    height: 44px;
    width: auto;
}

/* Top Search Bar (Reference: __메인상단참고.png) */
.al-top-search {
    display: flex;
    align-items: center;
    border: 2px solid var(--ks-navy);
    border-radius: 30px;
    height: 46px;
    padding: 0 4px 0 16px;
    background: #ffffff;
    max-width: 520px;
    width: 100%;
}

.al-top-search select {
    border: none;
    outline: none;
    font-family: var(--ks-font);
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    background: transparent;
    cursor: pointer;
    padding-right: 16px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333333'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 16px;
}

.al-top-search .search-divider {
    width: 1px;
    height: 18px;
    background: #dddddd;
    margin: 0 8px;
    flex-shrink: 0;
}

.al-top-search .al-search-input {
    border: none;
    outline: none;
    font-family: var(--ks-font);
    font-size: 14px;
    color: #1e293b;
    background: transparent;
    padding: 0 8px;
    flex: 1;
    min-width: 140px;
}

.al-top-search .al-search-input::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.al-top-search .al-search-submit {
    width: 38px;
    height: 38px;
    background: var(--ks-navy);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 4px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.al-top-search .al-search-submit:hover {
    background: var(--ks-navy-dark);
}

.al-top-search .al-search-submit svg {
    width: 18px;
    height: 18px;
}

/* Quick Nav Header Right - Hidden as requested */
.al-header-user-nav {
    display: none !important;
}

/* New Header Right Badges (출고후기 무지개 애니메이션 & 1544-0000 연락처 뱃지) */
.al-header-top-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

.al-badge-review {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff !important;
    text-decoration: none;
    background: linear-gradient(135deg, #ff007f, #7928ca, #0070f3, #00dfd8, #7928ca, #ff007f);
    background-size: 300% 300%;
    animation: rainbowGlow 4s linear infinite;
    box-shadow: 0 4px 15px rgba(121, 40, 202, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    letter-spacing: -0.3px;
    cursor: pointer;
}

.al-badge-review:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 0, 128, 0.5);
    color: #ffffff !important;
}

.al-badge-review .badge-icon {
    font-size: 12px;
    line-height: 1;
}

@keyframes rainbowGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.al-badge-tel {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 800;
    color: #082A66 !important;
    text-decoration: none;
    background: #f0f4fc;
    border: 1.5px solid #d4e2f9;
    box-shadow: 0 2px 8px rgba(8, 42, 102, 0.08);
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
    cursor: pointer;
}

.al-badge-tel .tel-icon {
    width: 15px;
    height: 15px;
    stroke: #0052cc;
    transition: stroke 0.25s ease;
}

.al-badge-tel:hover {
    background: #082A66;
    color: #ffffff !important;
    border-color: #082A66;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 42, 102, 0.25);
}

.al-badge-tel:hover .tel-icon {
    stroke: #ffffff;
}

/* ============================================================
   NAVIGATION BAR (GNB)
   ============================================================ */
.al-gnb-bar {
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid var(--ks-border);
}

.al-gnb-inner {
    max-width: var(--ks-max-w);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
}

.al-gnb-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 36px;
}

.al-gnb-menu li a {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #222222;
    text-decoration: none;
    height: 54px;
    position: relative;
    transition: color 0.2s;
}

.al-gnb-menu li a:hover,
.al-gnb-menu li.active a {
    color: var(--ks-navy);
}

.al-gnb-menu li a .badge-n {
    display: inline-block;
    background: var(--ks-red);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
    line-height: 12px;
}

.al-gnb-all-btn {
    background: var(--ks-navy);
    color: #ffffff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.al-gnb-all-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    position: relative;
}

.al-gnb-all-btn span::before,
.al-gnb-all-btn span::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #ffffff;
    left: 0;
}

.al-gnb-all-btn span::before { top: -6px; }
.al-gnb-all-btn span::after { top: 6px; }

/* ============================================================
   MAIN VISUAL & QUICK CONSULT SECTION (Reference: __메인상단참고.png)
   ============================================================ */
.al-mainvisual-wrap {
    background: var(--ks-gray-bg);
    padding: 30px 0 40px;
}

.al-mainvisual-inner {
    max-width: var(--ks-max-w);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 24px;
    align-items: stretch;
}

/* Banner Slider Box (Left Column) */
.al-banner-box {
    flex: 1;
    min-width: 0;
    border-radius: var(--ks-radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 13, 56, 0.08);
    background: #0f172a;
}

.al-banner-box .swiper {
    width: 100%;
    height: 100%;
    min-height: 480px;
}

.al-banner-box .swiper-slide {
    width: 100%;
    height: 100%;
}

.al-mainvisual-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.al-mainvisual-pic {
    display: block;
    width: 100%;
    height: 100%;
}

.al-mainvisual-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.al-mainvisual-link:hover .al-mainvisual-img {
    transform: scale(1.02);
}

/* Slider Controls Overlay */
.al-banner-controls {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.al-banner-toggle-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 11px;
    padding: 0 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.al-banner-counter {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.al-banner-counter .current {
    color: #38bdf8;
}

/* Quick Consult Form Box (Right Column) (Reference: __메인상단참고.png) */
.al-consult-card {
    width: 370px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: var(--ks-radius-lg);
    box-shadow: 0 10px 25px rgba(0, 13, 56, 0.08);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.al-consult-card h3.tit {
    font-size: 22px;
    font-weight: 800;
    color: #111111;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.al-consult-card h3.tit span {
    color: var(--ks-navy);
}

.al-consult-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.al-consult-form select,
.al-consult-form input[type="text"],
.al-consult-form input[type="tel"] {
    width: 100%;
    height: 42px;
    border: 1px solid var(--ks-border);
    border-radius: var(--ks-radius-sm);
    padding: 0 12px;
    font-family: var(--ks-font);
    font-size: 14px;
    color: #333333;
    outline: none;
    transition: border-color 0.2s;
    background-color: #ffffff;
}

.al-consult-form select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
}

.al-consult-form select:focus,
.al-consult-form input:focus {
    border-color: var(--ks-navy);
}

.al-form-flex-row {
    display: flex;
    gap: 8px;
}

.al-form-flex-row select {
    flex: 1;
}

.al-consult-agree {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #666666;
    margin-top: 4px;
    margin-bottom: 8px;
}

.al-consult-agree label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.al-consult-agree input[type="checkbox"] {
    accent-color: var(--ks-navy);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.al-consult-agree a {
    color: #999999;
    text-decoration: none;
}

.al-consult-agree a:hover {
    text-decoration: underline;
}

.al-consult-submit-btn {
    width: 100%;
    height: 50px;
    background: var(--ks-navy);
    color: #ffffff;
    font-family: var(--ks-font);
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--ks-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
}

.al-consult-submit-btn:hover {
    background: var(--ks-navy-dark);
}

/* ============================================================
   TIME SALE SECTION (Reference: __타임특가.png & ks-rentcar.com)
   ============================================================ */
.al-timesale-section {
    padding: 70px 0 90px;
    background: #ffffff;
}

.al-timesale-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.al-timesale-head h1.maintit {
    font-size: 36px;
    font-weight: 700;
    color: #111111;
    margin: 0;
    letter-spacing: -1px;
}

.al-timesale-head h1.maintit strong {
    font-weight: 800;
    color: var(--ks-navy);
}

.al-timesale-head .moreBtn {
    font-size: 15px;
    font-weight: 500;
    line-height: 36px;
    padding: 0 22px;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid var(--ks-navy);
    color: var(--ks-navy);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, color 0.2s;
}

.al-timesale-head .moreBtn:hover {
    background: var(--ks-navy);
    color: #ffffff;
}

/* Grid & Cards */
.al-timesale-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.al-car-card {
    background: #ffffff;
    border-radius: var(--ks-radius-lg);
    overflow: hidden;
    border: 1px solid #eef2f7;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.al-car-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(8, 42, 102, 0.12);
}

/* Car Photo Box */
.al-card-photo {
    height: 220px;
    background: var(--ks-card-bg);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.al-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.al-car-card:hover .al-card-photo img {
    transform: scale(1.06);
}

/* Badges */
.al-card-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: flex;
    gap: 4px;
}

.al-badge-item {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.al-badge-item.hot_sale { background: var(--ks-red); }
.al-badge-item.no_deposit { background: var(--ks-red); }
.al-badge-item.no_deposit::before { content: '★ '; color: #fff3a1; }
.al-badge-item.limited { background: var(--ks-purple); }
.al-badge-item.closing { background: var(--ks-orange); }

/* Card Content Area */
.al-card-body {
    padding: 18px 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.al-car-title {
    font-size: 19px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.al-car-desc {
    font-size: 13px;
    color: var(--ks-text-muted);
    margin-bottom: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Price Details */
.al-price-table {
    margin-top: auto;
}

.al-price-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--ks-text-sub);
    margin-bottom: 4px;
}

.al-price-row-top .val {
    font-weight: 600;
    color: var(--ks-text-main);
}

.al-price-row-rent {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4px;
}

.al-rent-lbl {
    font-size: 14px;
    font-weight: 600;
    color: #222222;
}

.al-rent-val {
    text-align: right;
}

.al-rent-val .old-price {
    font-size: 13px;
    color: #999999;
    text-decoration: line-through;
    margin-right: 6px;
}

.al-rent-val .sale-price {
    font-size: 24px;
    font-weight: 900;
    color: var(--ks-red);
    letter-spacing: -0.5px;
}

.al-lease-price {
    font-size: 12px;
    color: #999999;
    text-align: right;
    margin-bottom: 14px;
}

.al-lease-price span {
    color: #666666;
}

/* Terms Badges */
.al-card-terms {
    display: flex;
    gap: 6px;
}

.al-card-terms span {
    padding: 5px 10px;
    background: #F1F3F6;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #282A2E;
}

/* Card Bottom CTA Button */
.al-card-footer {
    padding: 0;
}

.al-card-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 15px 0;
    background: var(--ks-navy);
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: background 0.2s;
}

.al-card-cta-btn:hover {
    background: var(--ks-navy-dark);
}

.al-card-cta-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.al-card-cta-btn:hover svg {
    transform: translateX(4px);
}

/* Empty State */
.al-empty-timesale {
    text-align: center;
    padding: 80px 20px;
    color: var(--ks-text-muted);
    font-size: 16px;
}

/* ============================================================
   RESPONSIVE LAYOUT
   ============================================================ */
@media (max-width: 1200px) {
    .al-mainvisual-inner {
        flex-direction: column;
    }
    .al-consult-card {
        width: 100%;
    }
    .al-banner-box .swiper {
        min-height: 400px;
    }
    .al-timesale-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .al-timesale-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .al-header-top {
        flex-wrap: wrap;
        gap: 12px;
    }
    .al-top-search {
        order: 3;
        width: 100%;
    }
    .al-banner-box .swiper {
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    .al-mainvisual-wrap {
        padding: 16px 0 24px;
    }
    .al-mainvisual-inner {
        padding: 0 14px;
        gap: 16px;
    }
    .al-banner-box {
        border-radius: 12px;
    }
    .al-banner-box .swiper {
        min-height: auto;
        height: auto;
        aspect-ratio: 980 / 550;
    }
    .al-banner-controls {
        bottom: 12px;
        left: 12px;
        padding: 4px 10px;
        font-size: 11px;
        gap: 6px;
    }
    .al-banner-counter {
        font-size: 11px;
    }
}

@media (max-width: 600px) {
    .al-timesale-grid {
        grid-template-columns: 1fr;
    }
    .al-gnb-menu {
        gap: 16px;
        overflow-x: auto;
    }
    .al-gnb-menu li a {
        font-size: 14px;
        white-space: nowrap;
    }
    .al-timesale-head h1.maintit {
        font-size: 26px;
    }
    .al-rent-val .sale-price {
        font-size: 20px;
    }
}
