:root {
  --primary-color: #ea580c;
  --secondary-color: #c2410c;
  --text-color: #333;
  --secondary-light-color: #fbbf24;
  --dark-color: #111827;
  --light-color: #f9fafb;
  --white-color: #ffffff;
  --black-color: #000000;
  --gray-color: #4b5563;
  --gray-light-color: #6b7280;
  --gray-dark-color: #374151;
  --gray-bg-color: #f3f4f6;
  --gray-light-bg-color: #f7f7f7;
  --gray-dark-bg-color: #111827;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

.prod-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 1;
}

.text-center {
    text-align: center;
}

/* Products Hero Section */
.products-hero {
    /* background-color: var(--light-bg); */
    padding: 48px 0;
    /* background: url("../media/images/home-headers4-new.jpg") center/cover no-repeat; */
    position: relative; /* To ensure the content inside remains properly positioned */
    background: url("./images/home-headers4-new.jpg") center/cover no-repeat; /* Path to your background image in static folder */
    height: 350px; /* Adjust this height based on your design */
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8); /* A semi-transparent overlay to make text more readable */
  z-index: 0; /* Keeps the overlay behind the text */
}

.products-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.products-hero p {
    font-size: 1.25rem;
    color: #4b5563;
    margin-bottom: 24px;
}

/* Product Categories Navigation */
.product-categories {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding: 20px 0;
    background: var(--light-bg);
    border-bottom: 1px solid #eee;
}

.category-nav-container{
    width: 100%;
    overflow-x: auto;
}

.category-nav {
    display: flex;
    /* justify-content: center; */
    flex-wrap: nowrap;
    margin: 20px 0;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    white-space: nowrap; /* Prevent text from wrapping */
}

.category-nav button {
    padding: 10px 20px;
    border: none;
    background: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
}

.category-nav button.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.category-nav button.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background: white;
    /* border-radius: 8px; */
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.product-specs {
    margin: 15px 0;
}

.spec-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.spec-item i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: none;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Technical Specifications Section */
.technical-specs {
    background: var(--light-bg);
    padding: 60px 0;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.spec-card {
    background: white;
    padding: 20px;
    /* border-radius: 8px; */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.spec-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.spec-card ul {
    list-style: none;
    padding: 0;
}

.spec-card li {
    margin: 10px 0;
    padding-left: 20px;
    position: relative;
}

.spec-card li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* static/css/product-modal.css */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    /* Prevent modal itself from scrolling */
    overflow: hidden;
    scrollbar-width: none;
    --webkit-scrollbar-width: none;
}

.modal-content {
    background-color: #fefefe;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    /* border-radius: 8px; */
    width: 90%;
    max-width: 80%;
    /* Set a fixed height with some margin from viewport top/bottom */
    max-height: 80vh;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.modal-product-image {
    /* Prevent image from stretching modal */
    width: 45%;
}

.modal-product-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    /* border-radius: 4px; */
}

.modal-product-info {
    flex: 2;
    /* Enable scrolling for content */
    overflow-y: auto;
    /* Add padding for scrollbar */
    padding-right: 10px;
    /* Smooth scrolling */
    scroll-behavior: smooth;
    /* Style the scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) white;
}

/* Webkit scrollbar styles */
.modal-product-info::-webkit-scrollbar {
    width: 6px;
}

.modal-product-info::-webkit-scrollbar-track {
    background: white;
    border-radius: 3px;
}

.modal-product-info::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.modal-product-info::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.close-button {
    position: absolute;
    top: 5px;
    right: 8px;
    color: #666;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    /* Add hover effect */
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #333;
}

/* Style the content inside modal-product-info */
.modal-product-info h2 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 24px;
}

.modal-product-info p {
    color: #666;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .modal-product-image {
        max-width: 100%;
    }

    .modal-product-info {
        max-height: 70vh;
    }
}

.product-features,
.product-applications {
    margin-top: 20px;
}

.product-features h3,
.product-applications h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
}

.product-features ul,
.product-applications ul {
    list-style: none;
    padding-left: 0;
}

.product-features li,
.product-applications li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #555;
}

.product-features li:before,
.product-applications li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .modal-product-image {
        max-width: 100%;
    }

    .modal-product-info {
        max-height: 50vh;
    }
}
