/* General Body and Navbar adjustments */
body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

/* --- Header Section (Navbar) --- */
.main-header {
    background-color: #ffffff; /* White background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1030; /* Ensure navbar is above other content */
    /* Increased vertical padding for taller navbar and horizontal for bigger gaps */
    padding: 15px 100px; /* Increased vertical padding to 15px, horizontal to 100px */
    height: 80px; /* Set a fixed height for the navbar */
}

/* Adjust the container-fluid inside the navbar to stretch */
.main-header .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.main-header .navbar-brand .logo-img {
    height: 40px; /* Adjust logo size */
    width: auto;
}

.main-header .navbar-nav .nav-link {
    color: #343a40; /* Darker color for links on white background */
    font-weight: 600;
    margin-left: 15px; /* Spacing between nav items */
    transition: color 0.3s ease-in-out;
}

.main-header .navbar-nav .nav-link:hover,
.main-header .navbar-nav .nav-link.active {
    color: #007bff; /* Highlight color remains blue */
}

/* Dropdown Animation */
.main-header .dropdown-menu {
    background-color: #ffffff; /* White background for dropdown */
    border: 1px solid rgba(0, 0, 0, 0.1); /* Light border */
    padding: 0;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* Subtle shadow */
}

.main-header .dropdown-menu .dropdown-item {
    color: #343a40; /* Dark color for dropdown items */
    padding: 10px 20px;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.main-header .dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa; /* Light grey on hover */
    color: #007bff; /* Blue text on hover */
}

.main-header .dropdown-menu .dropdown-divider {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Animate.css Integration for Dropdown */
.dropdown-menu.animate__animated {
    animation-duration: 0.3s; /* Fast animation */
}

/* Search Icon and Overlay */
.search-icon-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.search-icon {
    font-size: 1.5rem;
    color: #343a40; /* Dark color for search icon on white navbar */
    cursor: pointer;
    transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.search-icon:hover {
    color: #007bff; /* Highlight color remains blue */
    transform: scale(1.1);
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Dark overlay - remains the same for contrast */
    z-index: 1040; /* Above navbar */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay .search-form {
    position: relative;
    max-width: 600px;
    animation: scaleIn 0.4s forwards; /* Animation for the form */
}

.search-overlay.active .search-form {
    animation: scaleIn 0.4s forwards;
}

.search-overlay .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 1.1rem;
    padding: 10px 20px;
}

.search-overlay .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-overlay .form-control:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #007bff;
    box-shadow: none;
    color: #ffffff;
}

.search-overlay .btn-outline-light {
    border-color: #007bff;
    color: #007bff;
    font-weight: 600;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.search-overlay .btn-outline-light:hover {
    background-color: #007bff;
    color: #ffffff;
}

.close-search {
    position: absolute;
    top: -30px; /* Position above the input */
    right: -30px;
    font-size: 1.8rem;
    color: #ffffff;
    cursor: pointer;
    transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.close-search:hover {
    color: #ff0000;
    transform: rotate(90deg);
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* NEW: Spacer Div to push content below fixed navbar */
#navbar-spacer {
    height: 80px; /* Should match the height of .main-header */
    width: 100%;
}

/* --- Section 2: PVC Rubber Badge Banner --- */
.pvc-section {
    background-image: url('../img/product/rubber/cover.jpg');
}

.button-section {
    background-image: url('../img/product/button/cover.jpg');
}

.gifting-section {
    background-image: url('../img/product/gifting/cover.jpg');
}

.hang-tag-section {
    background-image: url('../img/product/hangtag/cover.jpg');
}

.jute-item-section {
    background-image: url('../img/product/jute/cover.jpg');
}

.other-section {
    background-image: url('../img/product/other/cover.jpg');
}

.poly-bag-section {
    background-image: url('../img/product/polybag/cover.jpg');
}

.sticker-section {
    background-image: url('../img/product/sticker/cover.jpg');
}

.tape-section {
    background-image: url('../img/product/tape/cover.jpg');
}

.tie-section {
    background-image: url('../img/product/tiebelt/cover.jpg');
}

.woven-section {
    background-image: url('../img/product/woven/cover.jpg');
}

.pvc-badge-banner-section {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    
    position: relative;
    
    /* Use responsive height (vh) and a minimum height (px) */
    height: 60vh; /* Banner height is 60% of the viewport height */
    min-height: 400px; /* Minimum height is 400 pixels on smaller screens */
    
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 -10px 20px rgba(0,0,0,0.3);
}

/* The overlay and container rules from the previous step should remain the same. */
.pvc-badge-banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.pvc-badge-banner-section .container {
    position: relative;
    z-index: 2;
}

/* Stylized Font for PVC Rubber Badge Title */
.pvc-badge-banner-section .pvc-title {
    font-family: 'Playfair Display', serif; /* Apply the new stylish font */
    font-size: clamp(3.5rem, 9vw, 7rem); /* Slightly larger and more responsive */
    letter-spacing: 3px;
    font-weight: 700; /* Make it bold */
    text-shadow: 4px 4px 8px rgba(0,0,0,0.8); /* Stronger shadow */
    color: #fff; /* Ensure it's white for contrast */
}

/* --- Section 3: Product Description & Details Section --- */
.product-details-section {
    background-color: #ffffff; /* Base background for the section */
}

.product-details-section .text-primary {
    color: #007bff !important;
}

.product-details-section .text-secondary {
    color: #6c757d !important;
}

.product-features li {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
}

.product-details-section .card {
    border: none;
    border-radius: 10px;
}

.product-details-section .list-group-item {
    background-color: transparent;
    border-color: rgba(0, 0, 0, 0.08); /* Light separator */
    padding: 15px 0;
}
.product-details-section .list-group-item:last-child {
    border-bottom: none;
}

/* Animated Backgrounds for Product Description & Details */
.product-details-section .animated-bg-left {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.9));
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden; /* Important for animation */
}

.product-details-section .animated-bg-right {
    background: linear-gradient(135deg, rgba(230, 245, 255, 0.9), rgba(200, 230, 255, 0.9)); /* Lighter blue gradient */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden; /* Important for animation */
}

/* Common animation element for both backgrounds */
.animated-bg-left::before,
.animated-bg-right::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10%) 0 0 / 20px 20px,
                radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10%) 10px 10px / 20px 20px;
    animation: moveBackground 20s linear infinite; /* Adjust duration for speed */
    opacity: 0.5; /* Subtle overlay */
    z-index: 0; /* Keep behind content */
}

/* Animation Keyframes */
@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-50%, -50%); /* Moves the pattern diagonally */
    }
}

/* Ensure content is above the pseudo-element background */
.product-details-section .col-lg-7 > *,
.product-details-section .col-lg-5 > * {
    position: relative;
    z-index: 1;
}

/* Add padding to the column content itself to match the animated background padding */
.product-details-section .col-lg-7,
.product-details-section .col-lg-5 {
    padding-top: 20px; /* Adjust as needed */
    padding-bottom: 20px;
}


/* --- Section 4: Image Gallery with Zoom --- */
.gallery-section {
    background-color: #f8f9fa; /* Light background for the gallery section */
}

.gallery-item {
    cursor: pointer;
    margin-bottom: 20px; /* Space between images in the same column */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    width: 100%; /* Ensure images take full column width */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below images */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Adjust column spacing for gallery */
.gallery-section .row.g-4 > [class*="col-"] {
    padding-left: 10px; /* Reduce default padding to tighten columns */
    padding-right: 10px;
}

.gallery-section .col-lg-3 img {
    margin-bottom: 20px; /* Adjust spacing between images in same column */
}

/* --- Footer - MODIFIED --- */
.footer-custom {
    background-color: #1a2a3a; /* Dark background */
    padding: 60px 0 20px; /* Increased top padding, kept bottom padding for copyright */
    color: #cccccc;
}

.footer-custom h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #007bff; /* Primary blue for headings */
    margin-bottom: 20px;
}

.footer-custom p.small,
.footer-custom a.small {
    font-size: 0.9rem; /* Smaller text for addresses/contact */
    line-height: 1.6;
}

.footer-custom .footer-icon {
    font-size: 1.5rem; /* Size for phone/email icons */
    color: #007bff; /* Blue color for icons */
}

.footer-custom .social-icons .footer-icon {
    font-size: 1.8rem; /* Larger for social icons */
    color: #cccccc; /* Default social icon color */
    margin-right: 15px; /* Spacing between icons */
    transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.footer-custom .social-icons .footer-icon:hover {
    color: #007bff; /* Hover color */
    transform: translateY(-3px); /* Subtle lift effect */
}

.footer-custom a.text-white:hover {
    color: #007bff !important; /* Ensure links change color on hover */
}

.footer-custom hr {
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Responsive adjustments for general sections */
@media (max-width: 767px) {
    .main-header {
        padding: 0 15px; /* Adjust padding on small screens to prevent overflow */
        height: auto; /* Allow height to adjust on smaller screens for navbar toggler */
        min-height: 60px; /* Ensure a minimum height for navbar */
    }
    #navbar-spacer {
        height: 60px; /* Adjust spacer height for smaller screens if needed, or use JS to calculate */
    }
    .features-section h3.display-4 {
        font-size: 2.5rem;
    }
    .counter-item h2 {
        font-size: 2.5rem;
    }
    .counter-item p {
        font-size: 1rem;
    }
    .footer-custom {
        text-align: center; /* Center content on small screens */
    }
    .footer-custom .d-flex {
        justify-content: center; /* Center flex items too */
    }
    .footer-custom .social-icons {
        margin-top: 15px; /* Add some space above social icons */
    }
    .pvc-badge-banner-section .pvc-title {
        font-size: clamp(2.5rem, 9vw, 5rem); /* Smaller font size on small screens */
    }
}

.pvc-badge-banner-section .pvc-title {
    /*
     * The clamp() function takes three values:
     * 1. Minimum size: 3rem (used on small screens)
     * 2. Preferred size: 8vw (used to scale responsively)
     * 3. Maximum size: 5rem (used on large screens)
     */
    font-size: clamp(2.5rem, 9vw, 5rem);
}

@media (max-width: 767px) and (min-width: 690px) {
    .pvc-badge-banner-section .pvc-title {
        /* Set a specific font size that fits on a single line */
        font-size: 3.5rem; 
    }
}

@media (max-width: 689px) and (min-width: 645px) {
    .pvc-badge-banner-section .pvc-title {
        /* Set a specific font size that fits on a single line */
        font-size: 3.5rem; 
    }
}

@media (max-width: 768px) and (max-height: 688px) {
    /* Use the same specific selectors as the other rules */
    .pvc-badge-banner-section .container .pvc-title {
        font-size: 3rem;
    }
}

@media (max-width: 1400px) {
    /* Use the same specific selectors as the other rules */
    .pvc-badge-banner-section .sticker-title {
        font-size: 3rem;
    }
    .pvc-badge-banner-section .woven-title {
        font-size: 3rem; /* Smaller font size on small screens */
    }
}

@media (max-width: 991px) {
    /* Use the same specific selectors as the other rules */
    .pvc-badge-banner-section .sticker-title {
        font-size: 2.5rem;
    }
    .pvc-badge-banner-section .hang-tag-title {
        font-size: 2.5rem; /* Smaller font size on small screens */
    }
    .pvc-badge-banner-section .woven-title {
        font-size: 2.5rem; /* Smaller font size on small screens */
    }
}

@media (max-width: 768px) {
    /* Use the same specific selectors as the other rules */
    .pvc-badge-banner-section .sticker-title {
        font-size: 1.8rem;
    }
    .pvc-badge-banner-section .woven-title {
        font-size: 1.8rem; /* Smaller font size on small screens */
    }
}

@media (max-width: 511px) {
    /* Use the same specific selectors as the other rules */
    .pvc-badge-banner-section .sticker-title {
        font-size: 1.6rem;
    }
}
