*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

html {
    scroll-behavior: smooth;
}

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lora:ital,wght@0,400..700;1,400..700&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* Product Listing Header */
.product-listing-header{
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.89), rgba(0, 0, 0, 0)), var(--banner-desktop, url(images/banner\ solar\ gene.jpg));
    background-size: cover;
    background-position: center bottom; /* Align to bottom, crop from top */
    display: flex;
    align-items: center;
    height: 500px;
    color: white;
    text-align: left;
    padding: 0 200px;
}

.product-listing-caption {
    margin-top: -22px; /* adjust this if it clips or needs more space */
}

.product-listing-caption h2{
    font-size: 3em;
    font-weight: 700;
}

.product-listing-caption p{
        font-size: 1em;
        padding: 10px 0 0 0;
        color: #D9D9D9;
    }

/* Product Section */
.product-section{
    position: relative;
    border-bottom: 2px solid #D9D9D9;
    scroll-margin-top: 110px;
}

.product-header{
    text-align: left;
    padding: 20px 40px 20px 80px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    /* border-top: 2px solid #D9D9D9; */
}

.product-slider-indicator{
    position: absolute;
    top: 10px;
    right: 40px;
    display: none;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.product-slider-indicator .product-slider-dot{
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #D9D9D9;
    opacity: 0.9;
}

.product-slider-indicator .product-slider-dot.active{
    background: #048a08;
    opacity: 1;
}

.product-header h2 {
    margin: 0;
    font-size: 1.2em;
    color: #333333;
}

.product-header i{
    font-size: 0.8em;
}

.product-showcase{
    display: flex;
    flex-direction: row;
    font-family: "Roboto", sans-serif;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0px 40px 20px 40px;
    margin: 0 auto;
    max-width: 1400px;
    width: 100%;
}

.product-grid{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 80px;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
}

.product-card{
    background-color: #27272718;
    border-radius: 10px;
    padding: 20px;
    width: fit-content;
    min-width: 300px;
    height: fit-content;
    position: relative;
    flex: 0 0 calc(33.333% - 14px);
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff0000;
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    z-index: 5;
}

.sold-out-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #333333;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 700;
    z-index: 5;
}

.product-image img{
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-info{
    padding: 1px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-info p{
    font-size: 0.9em;
}

.brand{
    font-size: 0.8em;
    color: #666;
}

.star-ratings{
    display: flex;
    gap: 3px;
    align-items: center;
}

.product-name{
    font-size: 0.9em;
}

.product-price{
    font-size: 1.15em;
    font-weight: 700;
}

.btn-group{
    display: flex;
    gap: 10px;
}

.btn-group form {
    flex: 1;
    margin: 0;
}

.product-card-add-btn{
    background-color: #1a1a1a;
    border: none;
    color: white;
    padding: 10px 6px;
    cursor: pointer;
    width: 100%;
    border-radius: 8px;
    font-size: 0.8em;
}

.product-card-buy-btn{
    background-color: #048a08;
    border: none;
    color: white;
    padding: 10px 4px;
    cursor: pointer;
    border-radius: 8px;
    flex: 1;
    text-decoration: none;
    text-align: center;
    display: block;
    font-size: 0.8em;
}

.product-card-add-btn:disabled,
.product-card-buy-btn:disabled,
.add-to-cart-btn:disabled,
.buy-now-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* View All Button */
.view-all-btn {
    color: black;
    border: 1.2px solid #000000;
    text-decoration: none;
    padding: 15px 24px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 400;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
    font-family: "montserrat", sans-serif;
}

.view-all-btn:hover {
    background: #ebebebb4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(211, 211, 211, 0.3);
}

.desktop-view-all-container {
    display: block;
    text-align: center;
    padding: 20px 10px;
}

.mobile-view-all {
    display: none;
    text-align: center;
    padding: 0 10px;
}






/* Ads slider on product listing: match Need Help Choosing width on desktop only */
@media (min-width: 76px){
    .product-listing-ads{
        max-width: 1400px;
        margin: 10px auto;
        padding: 0 10px;
    }
}

@media (min-width: 769px){
    .product-listing-ads{
    padding: 0 20px;}
}

/* DESKTOP VIEW (1025px+) */
@media (min-width: 1025px){
    .product-header{
        max-width: 1300px; /* 1220px content + 2×40px padding = aligned with product-grid */
        padding: 20px 40px;
        margin: 0 auto;
    }

    .product-showcase{
        max-width: 1400px;
        gap: 20px;
        align-items: flex-start;
        position: relative;
    }

    .product-grid{
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 20px !important;
        width: 100%;
        max-width: 1220px; /* 4 cards (290px) + 3 gaps (20px) */
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
    }

    .product-grid::-webkit-scrollbar {
        display: none;
    }

    .product-card{
        width: fit-content !important;
        min-width: 270px !important;
        max-width: 290px !important;
        padding: 16px;
        margin: 0;
        flex: 0 0 auto !important;
    }

    .product-image{
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 10px;
    }

    .product-image img{
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .product-info{
        padding: 8px 0;
        gap: 10px;
    }

    .product-name{
        font-size: 0.88em;
        line-height: 1.3;
    }

    .brand{
        font-size: 0.8em;
    }

    .star-ratings{
        font-size: 0.82em;
    }

    .product-price{
        font-size: 1.15em;
    }

    .btn-group{
        display: flex;
        gap: 5px;
        margin-top: 8px;
        align-items: stretch;
    }

    .product-card-add-btn, 
    .product-card-buy-btn{
        padding: 9px 10px;
        font-size: 0.78em;
        height: auto;
        line-height: 1.2;
    }

    .btn-group form {
        flex: 1;
    }

    .product-card-add-btn {
        width: 100%;
    }

    .product-card-buy-btn {
        flex: 1;
        display: block;
        text-align: center;
    }

    .discount-badge{
        padding: 4px 7px;
        font-size: 0.78em;
    }

    /* Show slider arrows on desktop (same UX as mobile) */
    .product-nav {
        display: flex !important;
        position: absolute;
        top: 50%;
        border: none;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 18px;
        color: #048a08;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 100;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .product-nav:hover {
        background: rgba(4, 138, 8, 0.3);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        color: #048a08;
        transform: translateY(-50%) scale(1.15);
        box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    }

    .product-nav.product-prev {
        left: 10px;
    }

    .product-nav.product-next {
        right: 10px;
    }
}

/* LARGE DESKTOP (1440px+) */
@media (min-width: 1440px){
    .product-showcase{
        max-width: 1600px;
        gap: 28px;
    }

    .product-grid{
        gap: 24px !important;
    }

    .product-card{
        width: fit-content !important;
        min-width: 270px !important;
        max-width: 290px !important;
        padding: 16px;
    }

    .product-image img{
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .product-name{
        font-size: 0.9em;
    }

    .brand{
        font-size: 0.8em;
    }

    .star-ratings{
        font-size: 0.85em;
    }

    .product-price{
        font-size: 1.2em;
    }

    .btn-group{
        gap: 5px;
        margin-top: 8px;
    }

    .product-card-add-btn, 
    .product-card-buy-btn{
        padding: 9px 10px;
        font-size: 0.78em;
        height: auto;
        line-height: 1.2;
    }

    .discount-badge{
        padding: 5px 8px;
        font-size: 0.8em;
    }
}

.product-nav{
    display: none;
}

/* MOBILE VIEW (≤768px) */
@media (max-width: 768px){
    .product-listing-header{
        background-image: linear-gradient(to right, rgba(0, 0, 0, 0.89), rgba(0, 0, 0, 0)), var(--banner-mobile, var(--banner-desktop, url(images/banner\ solar\ gene.jpg)));
        padding: 0 50px;
        height: 400px;
        background-position: 80% center; /* Shifted slightly left from right */
        align-items: flex-start; /* pin children to top */
        padding-top: 140px;      /* add some top space so text isn't flush with the very top */
    }

    

    .product-listing-caption h2{
        font-size: 2em;
    }

    .product-listing-caption p{
        font-size: 0.9em;
        color: #D9D9D9;
    }

    .product-header{
        padding: 15px 10px 0px 10px;
    }

    .product-slider-indicator{
        right: 10px;
        top: 8px;
        gap: 5px;
    }

    .product-header h2{
        font-size: 1em;
    }

    .desktop-view-all-container {
        display: none;
    }

    .mobile-view-all {
        display: block;
    }

    .product-showcase{
        flex-direction: column;
        padding: 20px 10px;
        max-width: 100%;
        gap: 0px;
        overflow: visible;
        position: relative;
    }

    .product-grid{
        display: flex !important;
        flex-direction: row !important;
        gap: 12px !important;
        width: 100%;
        padding: 0;
        padding-left: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .product-grid::-webkit-scrollbar {
        display: none;
    }

    .product-card{
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
        padding: 12px;
        flex: 0 0 auto !important;
        margin: 0;
        scroll-snap-align: start;
    }

    .product-card:first-child{
        margin-left: 5000px;
    }

    .product-card:last-child{
        margin-right: 10px;
    }

    .discount-badge {
        top: 6px;
        right: 6px;
        padding: 3px 5px;
        font-size: 0.65em;
    }

    .product-image {
        display: flex;
        justify-content: center;
        margin-bottom: 8px;
    }

    .product-image img{
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .star-ratings{
        font-size: 0.65em;
        gap: 2px;
    }

    .product-name{
        font-size: 0.75em;
        line-height: 1.2;
        margin-bottom: 4px;
    }

    .brand{
        font-size: 0.65em;
    }

    .product-price{
        font-size: 0.95em;
    }

    .product-info{
        padding: 6px 0;
        gap: 5px;
    }

    .product-info p{
        font-size: 0.75em;
    }

    .btn-group{
        flex-direction: column;
        gap: 5px;
        margin-top: 6px;
    }

    .product-card-add-btn, 
    .product-card-buy-btn{
        width: 100%;
        padding: 7px 10px;
        font-size: 0.75em;
    }

    .view-all-btn {
        width: 99%;
        border-radius: 8px;
    }

    /* Product Grid Navigation Arrows */
    .product-nav {
        display: flex !important;
        position: absolute;
        top: 50%;
        border: none;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 18px;
        color: #048a08;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 100;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .product-nav:hover {
        background: rgba(4, 138, 8, 0.3);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        color: #048a08;
        transform: translateY(-50%) scale(1.15);
        box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    }

    .product-nav.product-prev {
        left: 10px;
    }

    .product-nav.product-next {
        right: 10px;
    }
}

/* SMALL MOBILE (≤480px) */
@media (max-width: 480px){
    .product-listing-header{
        padding: 0 30px;
        height: 350px;
        background-position: calc(100% * 0.75) center; /* Keep consistent with mobile */
        padding-top: 140px;
    }

    .product-listing-caption h2{
        font-size: 1.8em;
    }

    .product-card:first-child{
        margin-left: 8000px;
    }


    .product-header{
        padding: 20px 5px 0px 10px;
    }

    .product-header p{
        font-size: 0.8em;
    }

    .desktop-view-all-container,
    .mobile-view-all {
        padding: 0 5px;
    }

    .view-all-btn {
        padding: 15px 20px;
        font-size: 0.9em;
        width: 95%;
    }
}

/* Catalog section */
.catalog-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px; /* Reduced from 20px to 10px */
  align-items: center;
  justify-content: center;
  padding: 0 80px;
  position: relative;
  background: #f0f0f075;
  border-bottom: 3px solid #e0e0e0;
}

.catalog-container {
  display: flex;
  flex-direction: row;
  flex: 0 0 auto;
  gap: 10px; /* Reduced from 20px to 10px */
}

.catalog-container div {
  padding: 20px 0;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 150px;
  align-content: center;
}

.catalog-container div:hover {
  border-color: #ff6b35;
}

.catalog-container a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  font-size: .9em;
  font-family: "Barlow Condensed", sans-serif;
}

.catalog-container div:hover a {
  color: #ff6b35;
}

/* Hide catalog navigation arrows by default */
.catalog-nav {
  display: none;
}

/* Mobile styles for catalog slider */
@media (max-width: 768px) {
  .catalog-slider {
    padding: 10px 60px;
    margin: 0 0px;
    overflow-x: hidden;
    position: relative;
    gap: 5px; /* Reduced gap for mobile */
  }

  .catalog-container {
    min-width: 100%;
    justify-content: space-between;
    gap: 5px; /* Reduced gap for mobile */
  }

  .catalog-container div {
    flex: 1;
    min-width: calc(33.333% - 5px); /* Adjusted for smaller gap */
    max-width: calc(33.333% - 5px); /* Adjusted for smaller gap */
    /* padding: 15px 10px; */
    
  }

  .catalog-container a{
    font-size: 0.75rem;
  }

  /* Show catalog navigation arrows on mobile - Remove circular styling */
  .catalog-nav {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    align-items: center;
    justify-content: center;
  }

  .catalog-nav:hover {
    color: #ff6b35;
    transform: translateY(-50%) scale(1.1);
  }

  .catalog-nav.catalog-prev {
    left: 10px;
  }

  .catalog-nav.catalog-next {
    right: 10px;
  }
}
/* Make View Product links look like buttons */
a.product-card-buy-btn {
  text-decoration: none;
  display: inline-block;
  text-align: center;
  align-items: center;
}

a.product-card-buy-btn:hover {
  background-color: #048a08;
}

