.products-section {
    width: 100vw;
    background-color: #f8fbff; /* Extremely light blue-grey to differentiate from white */
    text-align: center;
}


.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 0 50px;
    padding-bottom: 0px;
}


.image-container {
    margin-bottom: 20px;
    width: 100%;
    
    aspect-ratio: 1 / 1; 
    position: relative;
    overflow: hidden;
    background: #f2f2f28c;
    box-shadow: inset 0 0 50px rgba(255, 235, 183, 0.1); /* Very faint golden internal glow */
}


.image-container img {
   height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}



.product-details h3 {
    font-size: 20px;
    letter-spacing: 2px;
    font-weight: 400;
    margin-bottom: 6px;
    color: #1a1a1a;
    /* Ensuring small letters are used if not specified in JSON */
    text-transform: none; 
}

.product-details h4 {
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 0px;
    color: #1a1a1a;
    /* Ensuring small letters are used if not specified in JSON */
    text-transform: none; 
    font-style: italic;
    font-weight: 800;
    
}


.discover-link {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #999;
    border-bottom: 1px solid #ddd;
    padding-bottom: 3px;
    transition: all 0.3s;
}



.discover-button {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 35px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    background-color: #00000000;
    color: #fff;
    border: 1px solid #00000000;
    font-family: copperplate;
    font: italic;
    margin-bottom: 5px;
    width: 100%;
}

.product-item:hover .discover-button {
    background-color: #fff;
    color: #000;
    border: 0.5px solid #000;
}

.discover-button:active {
    transform: scale(0.98);
}

.product-details {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 5px;
    padding-bottom: 10px;
    min-height: 90px;
}

.product-item .image-container {
    width: 100%;
    overflow: hidden; 
    position: relative;
}

.product-item .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.wide-item {
    grid-column: span 2;
}

.wide-item:hover .image-container img {
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}


.mega-item {
    grid-column: span 2;
    grid-row: span 2;
}

.mega-item:hover .image-container img {
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.image-container::before,
.image-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    filter: blur(30px); 
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease;
}

.image-container::before {
    background: conic-gradient(
        from 90deg at 50% 50%, 
        transparent 0deg, 
        rgba(255, 235, 183, 0.15) 60deg, 
        rgba(255, 255, 255, 0.628) 100deg,  
        rgba(255, 235, 183, 0.15) 90deg, 
        transparent 50deg
    );
    transform: rotate(-30deg); 
}

.image-container::after {
    background: conic-gradient(
        from 270deg at 50% 50%, 
        transparent 0deg, 
        rgba(255, 235, 183, 0.15) 60deg, 
        rgba(255, 255, 255, 0.628) 100deg, 
        rgba(255, 235, 183, 0.15) 90deg, 
        transparent 50deg
    );
    transform: rotate(-30deg);
}

.product-item:hover .image-container::before,
.product-item:hover .image-container::after {
    opacity: 1;
    transform: rotate(30deg); 
}

.product-item:hover .image-container img {
    filter: brightness(1) contrast(1); 
    transition: filter 0.8s ease;
}

.product-item.wide-item {
    grid-column: span 2;
}

/* Base state */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Revealed state */
.reveal-on-scroll.reveal-active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Safety: If the user is at the top of the page, 
   the first few items should just appear faster */
.product-gallery .product-item:nth-child(-n+4) {
    transition-delay: 0.1s;
}



button#load-more-btn {
    width: 20%;
}


h4.price {
    font-size: 14px;
    color: #282828;
    font-family: copperplate !important;
font-weight: 100;
}

h3.name-tag {
    font-size: 18px;
    font-weight: 100;
        font-family: copperplate !important;
        text-transform: uppercase;
}

.block {
    margin-bottom: 20px;
}


.carousel-indicators,
.carousel-next,
.discover-button {
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none; /* Prevents clicking a hidden button */
}



@media (hover: hover) {
    .product-item:hover .carousel-indicators,
    .product-item:hover .carousel-next,
    .product-item:hover .discover-button  {
        opacity: 1;
        pointer-events: auto;
    }

    .product-item:hover {
    box-shadow: inset 10px 10px 10px rgba(255, 255, 255, 0.3), inset -1px -1px 2px rgba(255, 255, 255, 0.2), 0 10px 25px rgba(0, 0, 0, 0.22);}
}


.product-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
    text-align: center;
}

.product-text {
    flex-grow: 1; /* This pushes the price and button down */
}

.price {
    margin-bottom: 15px;
}



/* 3. Mobile/Touchscreens: Always Visible */
@media (hover: none) {
    .carousel-indicators,
    .carousel-next,
    .discover-button {
        opacity: 1;
        pointer-events: auto;
    }
}


@media (max-width: 768px) {
    .product-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    padding: 0 5px;
    margin: 0 5px;
    padding-bottom: 0px;
}

h3.name-tag {
    font-size: 14px;
    font-weight: 100;
    text-transform: uppercase;
    font-family: copperplate !important;
}

.product-item {
    padding: 4px; /* Slimmer card frames */
}

.product-details h3 {
    font-size: 20px; /* Smaller font for mobile */
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.discover-link {
    font-size: 11px;
    padding-bottom: 2px;
}
     
.discover-button {
    display: inline-block;
    margin-top: 0px;
    padding: 12px 35px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    background-color: #92060600;
    color: #000000;
    border: 0.5px solid #000000;
    font: italic;
    margin-bottom: 5px;
    width: 100%;
    letter-spacing: 4px;
}

button#load-more-btn {
    width: 40%;
}

.product-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0px;
    padding-top: 20px;
    text-align: center;
    text-decoration: none;
    color: #000;
}

.block {
    margin-bottom: 40px;
}
}


@media (min-width: 1200px){

.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 0px 220px;
    padding-bottom: 0px;
}

}