/* Basic Reset */
body {
    font-family: "Yantramanav", sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
}

/* Button to Open Popup */
#open-popup {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(90deg, #d90329 0%, #d92c04 100%);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 50px;
    transition: 0.3s ease-in-out;
}

#open-popup:hover {
    transform: scale(1.05);
}

/* Background Blur Effect */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Popup Styling */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 11;
    padding: 20px;
    text-align: center;
    transition: 0.3s ease-in-out;
}

/* Selection Header */
.selection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin-bottom: 10px;
    padding: 0 10px;
}

.selection-header h2 {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-align: center;
    margin: 0;
}

/* Back & Close Buttons */
#back-button,
#close-popup {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.3s;
}

#back-button {
    font-size: 20px;
    color: #333;
    display: none;
}

#close-popup {
    font-size: 20px;
    color: #333;
}

#back-button i,
#close-popup i {
    font-size: 24px;
}

#back-button:hover,
#close-popup:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Search Box */
#search-container {
    position: relative;
    margin-bottom: 15px;
    margin-top: 10px;
}

#search-box {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

#search-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 18px;
    color: #888;
    cursor: pointer;
}

/* Selection Grid - 3 Columns, 3 Rows, Scroll After 3 Rows */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    grid-template-rows: repeat(3, auto); /* 3 rows */
    gap: 5px; /* Reduced space between items */
    max-height: 320px; /* Adjust based on item size */
    overflow-y: auto; /* Enable scrolling */
    padding-right: 5px; /* Avoid content cut-off when scrolling */
}

/* Style scrollbar for better visibility */
.selection-grid::-webkit-scrollbar {
    width: 5px;
}

.selection-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.selection-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* Selection Item */
.selection-item {
    cursor: pointer;
    transition: 0.3s ease-in-out;
    padding: -5px; /* Reduce padding for compact rows */
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: -5px; /* Reduce gap between text and image */
    background: #fff;
}

.selection-item img {
    width: 75px; /* Slightly smaller image */
    height: 75px;
    object-fit: contain;
}

.selection-item span {
    font-size: 14px;
    margin-top: -3px; /* Reduce margin */
}

.selection-item:hover {
    transform: scale(1.05);
}

/* Car Display Section - Constrained to services-2-section Width */
#car-display {
    display: none;
    position: relative;
    width: 100%;
    text-align: center;
    overflow: hidden;
}

/* Background Image for Selected Model - Same Width as services-2-section */
#car-bg {
    width: 100%;
    max-width: 1200px; /* Adjust this to match services-2-section width */
    margin: 0 auto; /* Center it within the section */
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease-in-out;
    opacity: 1;
    transform: scale(1.05);
}

/* Car Title Styling */
#car-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-family: "Yantramanav", sans-serif;
    color: white;
}

#car-title h2 {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    color: white;
}

/* Responsive */
@media (max-width: 500px) {
    .popup {
        width: 90%;
    }

    .selection-grid {
        grid-template-columns: repeat(3, 1fr); /* Keep 3 columns even in mobile */
    }
}

/* Washing price chart - Layout from old CSS, styles from new CSS */
.container {
    display: flex;
    justify-content: flex-start; /* Keeps tables aligned to the left */
    gap: 40px; /* Same spacing as old CSS */
    margin-top: -20px;
    margin-left: -10px; /* Moves container slightly left */
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

/* Table styling - Colors and styles from new CSS */
.styled-table {
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    font-family: sans-serif;
    min-width: 350px; /* Keeps original width */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    border-left: 1px solid #2389DA;  /* Added left border */
    border-right: 1px solid #2389DA; /* Added right border */
}

.styled-table thead tr {
    background-color: #2389DA;
    color: #ffffff;
    text-align: left;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px; /* Kept original padding */
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid #2389DA;
}

.styled-table tbody tr.active-row {
    font-weight: bold;
    color: #2389DA;
}

/* Responsive Design - Layout rules from old CSS */
@media screen and (max-width: 768px) {
    .container {
        justify-content: center; /* Centers tables */
        gap: 20px; /* Adjusted for better fit */
    }
    .styled-table {
        width: 90%;
        max-width: 350px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        flex-direction: column; /* Stacks tables vertically */
        align-items: center; /* Centers tables */
        gap: 15px; /* Keeps proper spacing */
    }
    .styled-table {
        width: 100%;
        max-width: 320px;
    }
}

/* select car detail menu */
.button-group {
    display: flex;
    justify-content: space-evenly; /* changed */
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
  }
  
  
  .category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 140px;
    background-color: #f9f9f9;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px;
    text-align: center;
  }
  
  .category-btn img {
    height: 70px;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
  }
  
  .category-btn span {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    line-height: 1.2;
    display: block;
  }
  
  .category-btn:hover {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
  }
  
  .category-btn.active {
    border: 2px solid #d90329;
    background-color: #fcf0f2;
  }

  
/* car service details*/
.part-card {
    display: flex;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0; /* thin border */
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 20px;
    align-items: center;
    gap: 30px;
    transition: all 0.3s ease;
    margin-bottom: 30px; /* spacing between articles */
  }
  
  .part-card:hover {
    background-color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border: 1px solid #f5c3cb;
  }
  
  .part-card img {
    width: 200px;       /* fixed width */
    height: 150px;      /* fixed height */
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
  }
  
  .part-card .middle-section {
    flex: 1;
  }
  
  .part-card .middle-section p.text-color-3 {
    color: #d90329;
    font-weight: 500;
    margin-bottom: 8px;
  }
  
  .part-card h4 {
    font-size: 22px;
    margin: 0;
    color: #222;
  }
  
  .part-card p {
    font-size: 14px;
    color: #555;
    margin: 4px 0;
  }
  
  .part-card a.view-details {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 24px; /* less top-bottom space, wider button */
    border: 1px solid #d90329;
    border-radius: 6px;
    color: #d90329;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  
  .part-card a.view-details:hover {
    background-color: #fff0f3;
  }
  
  .part-card .price-section {
    text-align: right;
    border-left: 1px solid #ddd;
    padding-left: 20px;
    min-width: 120px;
  }
  
  .part-card .price-section .price {
    font-size: 24px;
    color: #d90329;
    font-weight: 600;
  }
  
  .part-card .price-section .note {
    font-size: 12px;
    color: #555;
    margin-top: 5px;
  }
  
  @keyframes slideInUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  .part-card.slide-in {
    animation: slideInUp 0.4s ease forwards;
  }
  
  .car-header-section {
    position: relative;
    width: 100%;
    overflow: hidden;
  }
  
  .car-header-section .header {
    position: relative;
    width: 100%;
    height: 300px; /* Adjust height as per your preference */
  }
  
  .car-header-section .header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  .car-header-section .header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay for better text visibility */
    z-index: 1;
  }
  
  .car-header-section .header-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centers the content both horizontally and vertically */
    z-index: 2;
    color: white;
    text-align: center; /* Ensures text is centered */
    padding: 20px;
    width: 90%;
    max-width: 800px;
  }
  
  .car-header-section .header-content h1 {
    margin: 0 0 10px;
    font-size: 2rem;
    font-weight: bold;
    color: white;
  }
  
  .car-header-section .header-content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
  }
  