/* AutoRent - Car Rental Website Styles */

:root {
    --background: #0a0a0b;
    --foreground: #fafafa;
    --card: #141416;
    --card-foreground: #fafafa;
    --primary: #f97316;
    --primary-foreground: #ffffff;
    --secondary: #1c1c1f;
    --secondary-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --border: #27272a;
    --accent: #f97316;
}


/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #fb923c 50%, #fdba74 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #ea580c 100%);
    color: var(--primary-foreground);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

.btn-hero:hover {
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--foreground);
}

.btn-secondary:hover {
    background: var(--muted);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 1rem 0;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    text-decoration: none;
}

.logo svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--foreground);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--background) 0%, #0f0f12 50%, var(--background) 100%);
    position: relative;
    overflow: hidden;
    padding-top: 4rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 25%;
    left: -8rem;
    width: 16rem;
    height: 16rem;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 50%;
    filter: blur(60px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 25%;
    right: -8rem;
    width: 24rem;
    height: 24rem;
    background: rgba(249, 115, 22, 0.05);
    border-radius: 50%;
    filter: blur(60px);
}

.hero-content {
    text-align: center;
    max-width: 56rem;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 9999px;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.hero-badge svg {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    .hero h1 {
        font-size: 5rem;
    }
}

.hero p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 42rem;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

/* About Section */
.about {
    padding: 5rem 0;
    background: rgba(28, 28, 31, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 5rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--card) 0%, rgba(20, 20, 22, 0.8) 100%);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stat-card svg {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
    margin: 0 auto 0.75rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-header h2 {
        font-size: 2.5rem;
    }
}

.section-header p {
    color: var(--muted-foreground);
    max-width: 42rem;
    margin: 0 auto;
}

.advantages-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .advantages-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.advantage-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--card) 0%, rgba(20, 20, 22, 0.8) 100%);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    transition: border-color 0.3s;
}

.advantage-card:hover {
    border-color: rgba(249, 115, 22, 0.5);
}

.advantage-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.advantage-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.advantage-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.advantage-card p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Cars Section */
.cars {
    padding: 5rem 0;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.cars-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cars-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .cars-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.car-card {
    background: linear-gradient(135deg, var(--card) 0%, rgba(20, 20, 22, 0.8) 100%);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.car-image {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--secondary);
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Hover Effect: None */
.car-card.hover-none:hover {
    transform: none;
    box-shadow: none;
}

/* Hover Effect: Lift Up */
.car-card.hover-lift:hover {
    transform: translateY(-8px);
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 12px 40px rgba(249, 115, 22, 0.2);
}

/* Hover Effect: Glow */
.car-card.hover-glow:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.4), 0 0 60px rgba(249, 115, 22, 0.2);
}

/* Hover Effect: Zoom Image */
.car-card.hover-zoom:hover {
    border-color: rgba(249, 115, 22, 0.5);
}

.car-card.hover-zoom:hover .car-image img {
    transform: scale(1.1);
}

/* Legacy support - default lift effect for cards without hover class */
.car-card:not([class*="hover-"]):hover {
    transform: translateY(-8px);
    border-color: rgba(249, 115, 22, 0.5);
}

.car-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(249, 115, 22, 0.9);
    color: white;
    border-radius: 9999px;
}

.car-content {
    padding: 1.25rem;
}

.car-brand {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

.car-model {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    height: 60px;
}

.car-specs {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1.25rem;
}

.car-specs span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.car-specs svg {
    width: 1rem;
    height: 1rem;
}

.car-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.car-price {
    font-size: 1.5rem;
    font-weight: 700;
}

.car-price span {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-weight: 400;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: rgba(28, 28, 31, 0.3);
}

.contact-grid {
    display: grid;
    gap: 3rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary);
}

.contact-item h3 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--muted-foreground);
}

.contact-form {
    background: linear-gradient(135deg, var(--card) 0%, rgba(20, 20, 22, 0.8) 100%);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(10, 10, 11, 0.5);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--foreground);
    font-size: 1rem;
}

.form-input::placeholder {
    color: var(--muted-foreground);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-input {
    resize: none;
    min-height: 100px;
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer .container {
        flex-direction: row;
    }
}

.footer p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Utility Classes */
.hidden {
    display: none;
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
        display: flex !important;
        /* Force override for specificity if needed */
    }

    .md\:hidden {
        display: none;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--foreground);
}

.modal-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-right: 2rem;
}

.modal-car-info {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(28, 28, 31, 0.5);
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
}

.modal-car-info img {
    width: 6rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 0.375rem;
}

.modal-car-info p {
    margin: 0;
}

.modal-car-title {
    font-weight: 600;
}

.modal-car-specs {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.modal-car-price {
    color: var(--primary);
    font-weight: 700;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.price-calculation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 0.5rem;
}

.price-calculation span:first-child {
    color: var(--muted-foreground);
}

.total-price {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-buttons {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.modal-buttons .btn {
    flex: 1;
}

/* Toast Notification */
.rankup-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.rankup-toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.rankup-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #141416;
    border: 1px solid #27272a;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 300px;
}

.rankup-toast.success .rankup-toast-content {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.2);
}

.rankup-toast.error .rankup-toast-content {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2);
}

#rankup-toast-message {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

#rankup-toast-icon svg {
    width: 20px;
    height: 20px;
}

.rankup-toast.success #rankup-toast-icon {
    color: #22c55e;
}

.rankup-toast.error #rankup-toast-icon {
    color: #ef4444;
}

/* Availability Status */
.availability-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.availability-status.checking {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.availability-status.available {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.availability-status.not-available {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.availability-status .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.availability-status.info {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fefce8;
}

/* WooCommerce Blocks Checkout Customizations */
@media (min-width: 600px) {

    /* 50/50 fields - Hard approach using inline-block for maximum compatibility */
    .wc-block-components-checkout-field-rankup-rental-driver-first-name,
    .wc-block-components-checkout-field-rankup-rental-driver-last-name,
    .wc-block-components-checkout-field-rankup-rental-driver-license-state,
    .wc-block-components-checkout-field-rankup-rental-driver-license-number,
    .wc-block-components-checkout-field-rankup-rental-driver-age,
    .wc-block-components-checkout-field-rankup-rental-insurance-id,
    .wc-block-components-address-form__rankup-rental-driver-first-name,
    .wc-block-components-address-form__rankup-rental-driver-last-name {
        width: calc(50% - 8px) !important;
        display: inline-block !important;
        vertical-align: top !important;
        flex: 0 0 calc(50% - 8px) !important;
        /* Keep flex for containers that use it */
    }

    /* Add margin to odd (left) items */
    .wc-block-components-checkout-field-rankup-rental-driver-first-name,
    .wc-block-components-checkout-field-rankup-rental-driver-license-state,
    .wc-block-components-checkout-field-rankup-rental-driver-age,
    .wc-block-components-address-form__rankup-rental-driver-first-name {
        margin-right: 16px !important;
    }

    /* Reset width for mobile/small screens if needed (handled by media query) */
}

/* Fix for WooCommerce Blocks spacing */
.wc-block-components-text-input,
.wc-block-components-select-input {
    margin-bottom: 16px;
}

/* Loading Animations */
.cars-grid-container {
    position: relative;
    min-height: 200px;
}

.cars-grid-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 11, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border-radius: 1rem;
}

.cars-grid-container.is-loading .cars-grid-loader {
    opacity: 1;
    pointer-events: auto;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(249, 115, 22, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Entrance Animations */
.car-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

.car-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay for staggered entrance */
.car-card:nth-child(1) { transition-delay: 0.1s; }
.car-card:nth-child(2) { transition-delay: 0.2s; }
.car-card:nth-child(3) { transition-delay: 0.3s; }
.car-card:nth-child(4) { transition-delay: 0.4s; }
.car-card:nth-child(5) { transition-delay: 0.5s; }
.car-card:nth-child(6) { transition-delay: 0.6s; }
.car-card:nth-child(7) { transition-delay: 0.7s; }
.car-card:nth-child(8) { transition-delay: 0.8s; }