/* This rule hides the sub-pages by default */
.page-content { 
    display: none; 
}

/* --- Global Styles --- */
:root {
    --primary-color: #004a99; /* A professional blue */
    --secondary-color: #007bff;
    --whatsapp-color: #25D366;
    --offer-color: #e74c3c; /* Red for offer */
    --text-color: #333;
    --bg-light: #f4f4f4;
    --container-width: 90%;
    --max-width: 1100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    width: var(--container-width);
    max-width: var(--max-width);
    margin: 0 auto;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    line-height: 1.3;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.content-section {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

/* --- Header & Navigation --- */
header {
    background-color: #fff;
    padding: 0.5rem 0; /* Reduced padding for logo */
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- LOGO STYLES --- */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem 0;
    cursor: pointer;
}

.logo-img {
    height: 50px; /* Main logo height */
    width: auto;
    margin-right: 10px;
}

.logo-text {
    font-size: 1.5rem; 
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
    margin: 0; /* Remove default h1 margin */
}

.logo-span {
    font-weight: 300;
    font-size: 1.2rem; 
    color: #555;
    display: block;
}
/* --- END LOGO STYLES --- */

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

.main-nav li {
    margin-left: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem;
    transition: color 0.3s;
    cursor: pointer;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--secondary-color);
}

/* --- Mobile Navigation --- */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s;
}

/* Mobile Nav Toggle Active State */
.mobile-nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


.mobile-nav {
    display: none;
    background: #fff;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 75px; /* Adjust based on header height */
    z-index: 999;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
}

.mobile-nav li {
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.mobile-nav a {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
}

.mobile-nav a:hover {
    background-color: var(--bg-light);
}

/* --- Hero (Home) Section --- */
.hero {
    background: linear-gradient(rgba(0, 74, 153, 0.7), rgba(0, 74, 153, 0.7)), url('https://via.placeholder.com/1920x600/34495e/ffffff?text=Welcome+to+Anand+Krishi+Khamar') no-repeat center center/cover;
    color: #fff;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
}

.hero h2 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #0056b3;
    text-decoration: none;
}

/* --- About Section --- */
#about .container {
    max-width: 800px;
    text-align: center;
}

/* --- Products Section --- */
#products .product-grid {
    display: grid;
    /* Set min card width to ~220px to fit 4 in a row on ~1100px screens */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 1.5rem; /* Reduced gap slightly */
    margin-top: 2rem;
}

.product-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column; /* Allows button to be at bottom */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    aspect-ratio: 3 / 2; /* Set fixed 3:2 aspect ratio */
    object-fit: cover;
}

.product-card h3 {
    font-size: 1.5rem;
    padding: 1rem 1rem 0 1rem;
    color: var(--primary-color);
}

.product-card p {
    padding: 0 1rem 1.5rem 1rem;
    font-size: 0.9rem;
    flex-grow: 1; /* Pushes button to bottom */
}

/* Details Button on Product Card */
.details-button {
    display: block;
    background-color: #eeeeee; /* Light grey */
    color: #333; /* Darker text */
    text-align: center;
    padding: 0.8rem;
    margin: 0 1rem 1rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    border: 1px solid #ccc; /* Slightly darker border */
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer; 
}

.details-button:hover {
    background-color: var(--primary-color); /* Deep Blue */
    color: #fff; /* White text */
    text-decoration: none;
}

/* --- Gallery Section --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

/* --- Contact Section --- */
#contact .container {
    max-width: 900px;
    text-align: center;
}

.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.contact-item h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-item p {
    font-size: 1rem;
    line-height: 1.5;
}

/* --- Footer --- */
footer {
    background-color: var(--text-color);
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 40px;
}

/* --- Footer Developer Credit --- */
.developer-credit {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #ccc;
}
.developer-credit a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}
.developer-credit a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}
.linkedin-logo-svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}


/* ===============================================
  STYLES FOR LEARNING SECTION
===============================================
*/
#learning .container {
    text-align: center; /* Center the channel link */
}

.youtube-channel-link {
    display: inline-flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    margin: 1rem auto 2.5rem auto;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.youtube-channel-link:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    text-decoration: none;
}
.youtube-logo-svg {
    width: 28px;
    height: 20px;
    margin-right: 12px;
}
.youtube-channel-text {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.video-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive for learning section */
@media (max-width: 600px) {
    .youtube-channel-link {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    .youtube-channel-text {
        font-size: 1rem;
        text-align: center;
    }
}

/* ===============================================
  STYLES FOR SPECIAL OFFERS SCROLLER
===============================================
*/

#special-offers .container {
    text-align: center; /* Ensure the h2 is centered */
}

#special-offers h2 {
    display: inline-block; /* Makes background fit the text */
    background: var(--primary-color);
    color: #fff;
    font-size: 2.2rem; /* Smaller font size */
    padding: 8px 20px; /* Smaller padding */
    border-radius: 50px; /* Pill shape */
    box-shadow: 0 5px 15px rgba(0, 74, 153, 0.5);
    margin-bottom: 2rem; /* Adjust space below */
    transition: all 0.3s ease;
}

#special-offers h2:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 74, 153, 0.6);
}

.scroller-container {
    max-width: 100%;
    overflow: hidden;
    /* Add a soft fade effect on the edges */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.scroller-track {
    display: flex;
    width: calc(280px * 12); /* 280px item width * 12 items (6 original + 6 duplicate) */
    animation: scroll 30s linear infinite;
    gap: 1rem; /* Adds space between items */
}

.offer-item {
    width: 260px; /* A bit less than the calculation to account for gap */
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.offer-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* MODIFIED RULE */
.offer-item a {
    display: block;
    text-decoration: none;
    padding: 1rem;
    text-align: center; /* Centers the paragraph text */
}
.offer-item a:hover {
    text-decoration: none;
}

.offer-item img {
    width: 100%;
    height: 180px;
    object-fit: contain; /* Changed from 'cover' to 'contain' */
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.offer-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

/* Scroller Animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-280px * 6)); /* Move by the width of the 6 original items */
    }
}

/* --- Media Queries (Responsive Design) --- */
@media (max-width: 992px) {
    .logo-text { font-size: 1.4rem; }
    .logo-span { font-size: 1.1rem; display: inline;}
    .logo-img { height: 45px; }
    
    h2 { font-size: 2rem; }
    #special-offers h2 { font-size: 1.8rem; } /* Adjust for tablet */
    .hero h2 { font-size: 2.8rem; }
    
    /* On tablets, go back to 2 columns */
    #products .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .logo-text { font-size: 1.2rem; }
    .logo-span { font-size: 1rem; }
    .logo-img { height: 40px; }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .contact-details {
        grid-template-columns: 1fr;
    }
    
    h2 { font-size: 1.8rem; } /* Smaller base h2 on mobile */
    #special-offers h2 { font-size: 1.6rem; padding: 6px 15px; } /* Adjust for mobile */
    .hero h2 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    
    /* MODIFICATION: Force product grid to 1 column on mobile */
    #products .product-grid {
        grid-template-columns: 1fr;
    }
}


/* ===============================================
  STYLES FOR SUB-PAGES (FISH-SEEDS, ETC.)
===============================================
*/

/* --- SUB-PAGE HEADER --- */
.page-header {
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
    background-color: #fff;
    margin-bottom: 40px;
}
.page-header .container {
    display: flex;
    justify-content: flex-start; /* Align items to the start */
    align-items: center;
    position: relative; /* For centering title */
    min-height: 40px; /* Give it a minimum height */
}

/* Back Button */
.back-button {
    font-size: 1rem;
    font-weight: 600;
    color: #333; /* Darker text */
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border: 1px solid #ccc; /* Slightly darker border */
    border-radius: 5px;
    background-color: #eeeeee; /* Light grey */
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
    cursor: pointer;
}
.back-button:hover {
    background-color: var(--primary-color); /* Deep Blue */
    color: #fff; /* White text */
    text-decoration: none;
}
.page-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap; /* Prevent line breaks */
    text-align: center;
}
/* --- END SUB-PAGE HEADER --- */


/* Main content container for the list */
.seed-list-container {
    max-width: 1000px; 
    margin: 0 auto 60px auto; 
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.seed-list-container p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Grid for seed items */
.seed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 1.5rem; 
}

.seed-item {
    background: var(--bg-light); 
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.seed-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.seed-item img {
    width: 100%; 
    aspect-ratio: 3 / 2; 
    object-fit: cover; 
    border-radius: 4px; 
    margin-bottom: 1rem;
    border: 1px solid #ccc; 
    flex-shrink: 0; 
}

.seed-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    flex-grow: 1; 
}

.whatsapp-button {
    background-color: var(--whatsapp-color);
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    transition: background-color 0.3s;
    width: 100%; 
    max-width: 250px; 
    display: inline-block; 
}

.whatsapp-button:hover {
    background-color: #1EBE56; 
    text-decoration: none;
}

/* Responsive for the seed list page */
@media (max-width: 768px) {
    .seed-list-container {
        padding: 1rem;
        margin: 20px 10px 40px 10px;
    }
    
    .seed-grid {
        grid-template-columns: 1fr; /* Single column on smaller screens */
    }

    .seed-name {
        font-size: 1.2rem;
    }

    .whatsapp-button {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        max-width: none; 
    }
}


/* ===============================================
  STYLES FOR POULTRY-VET.HTML & FISH-MEDICINE.HTML
===============================================
*/

.product-list-container {
    max-width: 1000px; 
    margin: 0 auto 60px auto;
    padding: 1rem;
}

.product-item {
    display: flex;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 2.5rem; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden; 
}

.product-image-container {
    flex: 0 0 280px; 
    background: var(--bg-light);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-item img {
    width: 100%;
    aspect-ratio: 3 / 4; 
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.product-details {
    flex: 1; 
    padding: 1.5rem 2rem;
}

.product-details h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.product-details h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-details p, 
.product-details ul {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.product-details ul {
    list-style-type: disc;
    list-style-position: inside;
    padding-left: 0.5rem;
}

.product-details ul ul {
    list-style-type: circle;
    margin-top: 0.5rem;
    padding-left: 1rem;
}

/* --- PRICE STYLES --- */
.price-container {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #fdfaf6; 
    border: 1px dashed var(--secondary-color);
    border-radius: 4px;
    text-align: center;
    display: flex;
    flex-wrap: wrap; 
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.price-original {
    font-size: 1.1rem;
    color: #888;
    text-decoration: line-through;
}

.price-offer {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.offer-badge {
    background: var(--offer-color);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
}
/* --- END PRICE STYLES --- */


.product-details .whatsapp-button {
    margin-top: 0.5rem; 
    display: inline-block;
    width: auto; 
    max-width: 300px;
    padding: 0.7rem 1.5rem; 
    font-size: 0.95rem;
}

/* Responsive for product details page */
@media (max-width: 800px) {
    .product-item {
        flex-direction: column; /* Stack image on top of details */
    }

    .product-image-container {
        flex: 0 0 auto; /* Reset flex */
        width: 100%;
        max-height: 400px; /* Limit image height */
    }

    .product-item img {
        width: auto;
        max-width: 100%;
        max-height: 380px;
        aspect-ratio: 3 / 4;
    }

    .product-details {
        padding: 1.5rem;
    }

    .product-details h3 {
        font-size: 1.8rem;
    }

    .price-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .price-offer {
        font-size: 1.4rem;
    }
}

/* --- UPDATED Mobile Styles for Sub-Page Header --- */
@media (max-width: 768px) {
    .page-header h2 {
        font-size: 1.1rem; /* Smaller font on mobile */
        position: static; /* Unset position */
        transform: none; /* Remove transform */
        margin-left: 0.75rem; /* Add space from back button */
        white-space: normal; /* Allow wrap */
        text-align: left;
        flex: 1; /* Allow title to take remaining space */
    }
    .page-header .container {
        justify-content: flex-start; /* Keep items to the left */
    }
    .back-button {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ===============================================
  WHATSAPP FAB
===============================================
*/
.whatsapp-fab {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    left: 30px; /* Changed from right to left */
    background-color: var(--whatsapp-color);
    color: #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1001; /* Higher than header */
    transition: all 0.3s;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    color: #FFF;
    text-decoration: none;
}

.whatsapp-fab svg {
    width: 32px;
    height: 32px;
}

/* Responsive for WhatsApp FAB */
@media (max-width: 768px) {
    .whatsapp-fab {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px; /* Changed from right to left */
    }
    .whatsapp-fab svg {
        width: 28px;
        height: 28px;
    }
}