  /* ==============================
   Product Page CSS
============================== */
@import url('/siat/student_projects/iat339_2025_spring/mkp6/P2/P2-NEW/css/base.css'); 

:root {
    --color-primary: #ff5722;
    --color-primary-hover: #e64a19;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray: #666666;
    --color-light-gray: #f5f5f5;
    --border-radius: 0.5rem;
    --border-color: #ddd;
    --divider-color: #EC943D;
    --shadow-md: 0rem 0.25rem 0.625rem rgba(0, 0, 0, 0.1);
  }

.grid-nav{
    color: white;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.grid-nav h1{
    margin-top: auto;
    margin-bottom: auto;
}

/* General Product Page Styling */
.product-page {
    align-items: center;
    padding: var(--space-6);
}

/* Product Grid */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
    max-width: 75rem; /* Set a max-width */
    width: 100%; /* Ensure it adapts */
    margin: 0 auto; /* Center the grid */
    padding: var(--space-6) 0;
}


/* Product heading Alignment */
.product-page h2 {
    text-align: left;
    font-size: var(--text-3xl);
    margin-bottom: var(--space-5);
    margin-left:6rem;
}

/* Product Titles Alignment */
.product-page h3 {
    text-align: left;
    font-size: var(--text-xl);
    margin-bottom: var(--space-5);
    color: var(--color-primary);
    max-width:75rem;
    margin-left:6rem;
    
}

/* Product Cards */
.product-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    background: white; /* Ensuring a clean background */
    border: 0.125rem solid var(--color-border); /* Adds a border */
    border-radius: var(--border-radius); /* Soft rounded edges */
    box-shadow: var(--shadow-md); /* Adds depth */
    padding: var(--space-4); /* Spacing inside the box */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Add a pseudo-element that will display the sc image */
.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 90%;
    height: 90%;
    background: url('/siat/student_projects/iat339_2025_spring/mkp6/P2/P2-NEW/Images/sc.png') center center/cover no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 0; /* Behind the product image */
}

/* The product image stays on top */
.product-card img {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease-in-out;
}

/* On hover, show the sc image in the background */
.product-card:hover::before {
    opacity: 0.2;
}

/* Product Titles */
.product-card h3 {
    font-size: var(--text-xl);
    margin: var(--space-3) 0;
    text-align: center;
}

/* Price */
.price {
    font-size: var(--text-xl);
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: var(--space-3);
}

/* Remove Quantity Selector */
.quantity-selector {
    display: none !important;
}

/* Add to Cart Button */
.add-to-cart {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: var(--space-3);
    font-size: var(--text-lg);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Button Hover Effect */
.add-to-cart:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 0.188rem 0.375rem rgba(0, 0, 0, 0.2);
}

/* Desktop: Screens up to 1200px */
@media (max-width: 75rem) {
    .product-detail {
        max-width: 90%; /* Allow it to scale properly */
        padding: var(--space-4);
    }

    .product-container {
        gap: 2rem;
        flex-wrap: wrap;
    }

    .product-media {
        flex: 1;
    }

    .product-info {
        flex: 1;
        padding: var(--space-3);
    }

    .main-image {
        max-height: 25rem;
    }

    .add-to-cart {
        font-size: var(--text-base);
        padding: var(--space-3);
    }
}

/* Tablet: Screens up to 768px */
@media (max-width: 48rem) {
    .product-detail {
        max-width: 100%;
        padding: var(--space-3);
    }

    .product-container {
        flex-direction: column;
        align-items: center;
        gap: var(--space-3);
    }

    .product-media {
        width: 100%;
        text-align: center;
    }

    .product-info {
        width: 100%;
        padding: var(--space-3);
    }

    .product-gallery {
        padding: var(--space-2);
    }

    .main-image {
        max-height: 37.5rem;
    }

    .thumbnail {
        width: 3.75rem;
        height: 3.75rem;
    }

    .quantity-btn {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.3rem;
    }

    .add-to-cart {
        width: 100%;
        font-size: var(--text-base);
    }
}

/* Mobile: Screens up to 480px */
@media (max-width: 30rem) {
    .product-detail {
        padding: var(--space-2);
    }

    .product-container {
        flex-direction: column;
        align-items: center;
        gap: var(--space-2);
    }

    .product-info {
        padding: var(--space-2);
    }

    .main-image {
        max-height: 18.75rem;
    }

    .thumbnail {
        width: 3.125rem;
        height: 3.125rem;
    }

    .quantity-btn {
        width: 2rem;
        height: 2rem;
        font-size: 1.2rem;
    }

    .add-to-cart {
        font-size: var(--text-sm);
        padding: var(--space-2);
        width: 100%;
    }
}

/* Small Mobile: Screens up to 320px */
@media (max-width: 20rem) {
    .product-detail {
        padding: var(--space-1);
    }

    .product-container {
        gap: var(--space-1);
    }

    .product-info {
        padding: var(--space-1);
    }

    .main-image {
        max-height: 15.625rem;
    }

    .thumbnail {
        width: 2.5rem;
        height: 2.5rem;
    }

    .quantity-btn {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 1rem;
    }

    .add-to-cart {
        font-size: var(--text-xs);
        padding: var(--space-1);
        width: 100%;
    }
}
