/* Hunny Motors Vehicle Stock Management - Enhanced CSS */

:root {
    --primary-color: #3a6ea5;
    --primary-dark: #2c5682;
    --secondary-color: #f39c12;
    --accent-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #f9f9f9;
    --dark-bg: #2c3e50;
    --text-color: #333;
    --light-text: #f5f5f5;
    --border-color: #ddd;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    --transition-speed: 0.3s;
    --success-color: #2ecc71;
    --light-gray: #f9f9f9;
    --mid-gray: #e0e0e0;
    --dark-gray: #707070;
    --black: #333333;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    --border-radius: 8px;
    --whatsapp-color: #25D366;
    --facebook-color: #4267B2;
    --transition: all 0.3s ease;
    --button-gradient: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    --section-padding: 80px 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--light-gray);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--secondary-color);
    line-height: 1.2;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 15px;
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.logo h1 {
    margin-bottom: 0;
    color: var(--primary-color);
    font-weight: 700;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 30px;
    position: relative;
}

nav a {
    color: var(--dark-gray);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    font-size: 1.05rem;
}

nav a.active {
    color: var(--primary-color);
}

nav a:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav a.active:after, nav a:hover:after {
    width: 100%;
}

/* Main content */
main {
    flex: 1;
    padding: 40px 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.page-header h2 i {
    margin-right: 0.8rem;
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    background: var(--button-gradient);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(74, 137, 220, 0.25);
    outline: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 137, 220, 0.35);
    color: var(--white);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 4px 10px rgba(58, 110, 165, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #e67e22);
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
}

.btn-whatsapp {
    background: linear-gradient(135deg, var(--whatsapp-color), #128C7E);
}

.btn-facebook {
    background: linear-gradient(135deg, var(--facebook-color), #385898);
}

.btn-view {
    background: linear-gradient(135deg, #6a89cc, #4a69bd);
}

.btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.btn-next i {
    margin-left: 8px;
    margin-right: 0;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1.1rem;
}

/* Enhanced Vehicle Grid */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    animation: fadeInUp 0.6s ease;
}

.vehicle-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
    position: relative;
    animation: slideInUp 0.6s ease forwards;
}

.vehicle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.vehicle-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.vehicle-card:hover .vehicle-image img {
    transform: scale(1.08);
}

.no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--light-gray), var(--mid-gray));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    color: var(--dark-gray);
}

.no-image i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: var(--dark-gray);
    opacity: 0.6;
}

.vehicle-info {
    padding: 25px;
}

.vehicle-info h3 {
    font-size: 1.4rem;
    margin-bottom: 18px;
    color: var(--secondary-color);
    line-height: 1.3;
    font-weight: 700;
}

.vehicle-details {
    margin-bottom: 25px;
}

.vehicle-details p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--dark-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vehicle-details p strong {
    color: var(--black);
    margin-right: 8px;
    font-weight: 600;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.vehicle-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.vehicle-actions .btn {
    padding: 12px 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-view {
    grid-column: 1 / -1;
}

/* Forms */
.form-container {
    background-color: white;
    border-radius: 0.8rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    gap: 0.5rem;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-bg);
    font-size: 0.95rem;
    display: block;
}

.form-control {
    transition: all 0.3s ease;
    background-color: #f9fafc;
    border: 1px solid #e0e5ec;
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.form-control:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.15);
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.section-title h3 {
    margin-bottom: 0;
    color: var(--primary-color);
}

/* Enhanced Checkbox styling */
.checkbox-group {
    margin: 20px 0;
}

.fancy-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.fancy-checkbox:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.fancy-checkbox input[type="checkbox"] {
    display: none;
}

.fancy-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-bg);
    font-size: 1rem;
    margin: 0;
    width: 100%;
}

.checkbox-icon {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-radius: 6px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.fancy-checkbox input[type="checkbox"]:checked + label .checkbox-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(58, 110, 165, 0.3);
}

.fancy-checkbox input[type="checkbox"]:checked + label .checkbox-icon::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.fancy-checkbox input[type="checkbox"]:checked + label {
    color: var(--primary-color);
}

/* Alternative checkbox style for better visibility */
.checkbox-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-bg);
    padding: 15px 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.checkbox-container:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 8px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Status displays */
.status-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    font-size: 0.9rem;
}

.status-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--dark-gray);
}

.status-circle.status-green {
    background-color: var(--success-color);
}

.status-circle.status-yellow {
    background-color: var(--warning-color);
}

.status-circle.status-red {
    background-color: var(--danger-color);
}

.status-circle.status-grey {
    background-color: var(--dark-gray);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo h2 {
    color: var(--white);
    margin-bottom: 10px;
}

.footer-logo p {
    color: var(--light-text);
    opacity: 0.8;
}

.footer-contact h3 {
    color: var(--white);
    margin-bottom: 15px;
}

.footer-contact p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: 10px;
    width: 16px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    opacity: 0.7;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Form hints */
.form-hint {
    font-size: 0.85rem;
    color: var(--dark-gray);
    margin-top: 5px;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .vehicle-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-tabs {
        flex-direction: column;
    }

    .tab-btn {
        text-align: left;
        border-bottom: none;
        border-left: 3px solid transparent;
        padding: 0.8rem 1rem;
    }

    .tab-btn.active {
        border-left-color: var(--primary-color);
        border-bottom-color: transparent;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    nav li {
        margin-left: 0;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for vehicle cards */
.vehicle-card:nth-child(1) { animation-delay: 0.1s; }
.vehicle-card:nth-child(2) { animation-delay: 0.2s; }
.vehicle-card:nth-child(3) { animation-delay: 0.3s; }
.vehicle-card:nth-child(4) { animation-delay: 0.4s; }
.vehicle-card:nth-child(5) { animation-delay: 0.5s; }
.vehicle-card:nth-child(6) { animation-delay: 0.6s; }

/* Vehicle badge */
.vehicle-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

/* No vehicles found styling */
.no-vehicles {
    text-align: center;
    padding: 60px 20px;
    color: var(--dark-gray);
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.no-vehicles i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
    color: var(--dark-gray);
}

.no-vehicles h3 {
    margin-bottom: 10px;
    color: var(--dark-gray);
}

/* Image gallery styles */
.image-gallery {
    margin-top: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gallery-item {
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dropzone styling */
.dropzone {
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(58, 110, 165, 0.05);
}

.dropzone:hover {
    background-color: rgba(58, 110, 165, 0.1);
}

.dz-message {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.dz-preview {
    margin: 10px !important;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced card hover effects */
.vehicle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.vehicle-card:hover::before {
    left: 100%;
}

/* Status indicators */
.status-green { color: var(--success-color); }
.status-yellow { color: var(--warning-color); }
.status-red { color: var(--danger-color); }
.status-grey { color: var(--dark-gray); }
