#categories_nav p {
    padding: 0;
    margin: 0;
}

#pro-nav {
    display: flex;
    width: 75%;
    flex-direction: row;
    justify-self: center;
    margin-top: 20px;
    gap: 15px;
}

.container {
    display: grid;
    grid-template-columns: 40% 60%;
    padding: 20px 15px;
    row-gap: 25px;
    width: 100%;
}

.pro_img {
    position: relative;
    width: 100%;
    display: flex;
    border-radius: 20px;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 10px #5252525a;
    height: fit-content;
}

.pro_det {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 50px;
}

#proname {
    color: #5e0a9e;
    font-size: 2rem;
    font-weight: 500;
}

#prorating {
    display: flex;
    flex-direction: row;
    gap: 5px;
    font-size: 1.7rem;
    font-weight: 600;
}

#stars i {
    position: relative;
    color: #960ffa;
    bottom: 2px;
}

#proprice {
    font-weight: 700;
}

#centerstage {
    display: flex;
    position: relative;
    width: 100%;
    border-radius: 20px;
    align-items: center;
    justify-content: center;
    height: 500px;
    background-color: #000;
}

#mainimg {
    width: 100%;
}

.thumbnail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    grid-column: 1/span 2;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
    width: 100%;
}

.thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.thumbnail img:hover {
  border-color: #666;
}

.thumbnail img.selected {
    border: 2px solid #960ffa;   
    box-shadow: 0 0 4px #960ffa;
}

#leftarrow {
    position: absolute;
    top: 50%;
    left: 5px;
    width: 30px;
    transform: translateY(-50%);
}

#rightarrow {
    position: absolute;
    top: 50%;
    right: 5px;
    width: 30px;
    z-index: 5;
    transform: translateY(-50%);
}

.img_arrows:hover {
    cursor: pointer;
}

#prodetails {
    position: relative;
    justify-self: flex-start;
}

#addtocart {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: row;
    width: 40%;
    background-color: black;
    padding: 2px 10px;
    color: #5e0a9e;
    margin: 10px 0;
}

#addtocart h2 {
    display: flex;
    align-self: center;
    font-weight: 700;
}

.a {
    text-decoration: none;
    color: white;
} 

#cutout {
    height: 105px;
    position: absolute;
    right: 10px;
    bottom: 50%;
    transform: translateY(50%);
}

#qty_cont {
    display: flex;
    position: relative;
    flex-direction: row;
    margin: 10px 10px;
    gap: 20px;
    border-radius: 10px;
    width: fit-content;
    align-items: center;
}

#qty_cont p {
    font-size: 20px;
    margin: auto 0;
}

.qtycons {
    width: 32px;
}

#qty_no {
    padding: 5px 10px;
    background-color: #960ffa;
    font-size: 20px;
    font-weight: 500;
    border-radius: 12px;
}

.variation {
    color: #888888;
}

.btn1 {
    background-color: #960ffa;
    border-color: #960ffa;
    padding: 12px 15px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: black;
    margin-top: 20px;
    transition: background-color 0.2s;
}

.btn1 a {
    text-decoration: none;
    color: black;
}

.btn1:hover {
    background-color: #750cc6;
    border-color: #750cc6;
}

.line {
    height: 0.8px;
    width: 100%;
    margin: 5px 0px 10px 0px;
    grid-column: 1 / span 2;
    background-color: #7d7d7d;
}


#prodets {
    grid-column: 1 / span 2;
    grid-row: 3;
}

.prospec {
    display: flex;
    flex-direction: column;
    grid-column: 1/span 2;
    width: 100%;
}

.prospec h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

#dashedline {
    height: 1px; 
    width: 100%;
    background-color: #8e8e8e;
}

.speccontent {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 20px;
}

.spec h3 {
    font-size: 1.5rem;
    color: #960ffa;
    margin: 10px 0;
}

.spec {
    padding: 20px 20px;
    box-shadow: 0 0 10px #6666663b;
    border-radius: 15px;
    width: 100%;
}

#actualfeat {
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0.5rem 0;
    color: #750cc6;
}

.colors {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.colors div {
    display: flex;
    flex-direction: row;
}

.mesh-name {
    width: 80px;
}

.color-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #949393;
}

.color-dot.selected {
    border-color: #6b46ff;
    box-shadow: 0 0 6px rgba(107, 70, 255, 0.4);
    transform: scale(1.1);
}

.mesh-name {
    font-size: 18px;
    font-weight: 500;
}

.colors div {
    display: flex;
    flex-direction: row;
    gap: 10px;
}


.pointer {
    cursor: pointer;
}

/* more products */

.morepro {
    grid-column: 1 / span 2 ;
    align-items: center;
}

.header2 {
    text-align: center;
    margin-bottom: 40px;
}

.header-subtitle {
    color: #666;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.header-title {
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #000;
}

.products-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.products-grid > * {
    flex: 1 1 calc(25% - 20px);
    max-width: 370px;
    text-decoration: none;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    position: relative;
    overflow: hidden;
}

.product-image svg {
    width: 80px;
    height: 80px;
    opacity: 0.3;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
}

.product-image img {
    height: 100%;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.product-price {
    font-size: 18px;
    color: #000;
    font-weight: 600;
}

/* --- ROBUST MOBILE RESPONSIVENESS --- */
@media only screen and (max-width: 900px) {
    
    #pro-nav {
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
        font-size: 0.9rem;
    }

    /* 1. SWITCH TO FLEXBOX (Fixes the side-by-side & ghost column issue) */
    .container {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 15px; /* Add padding to container, not children */
        box-sizing: border-box;
        row-gap: 0; /* Let margins handle spacing */
    }

    /* 2. IMAGE SECTION */
    .pro_img {
        width: 100%;
        margin-bottom: 20px;
        box-shadow: none; /* Cleaner look on mobile */
    }

    #centerstage {
        height: 350px; /* Reduced height for mobile screens */
    }

    #mainimg {
        max-height: 300px;
        max-width: 100%;
        object-fit: contain;
    }

    /* 3. DETAILS SECTION */
    .pro_det {
        width: 100%;
        padding: 10px 0; /* Remove the 50px desktop padding */
    }

    #proname {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    #addtocart {
        width: 100%; /* Full width button */
        justify-content: center;
        padding: 15px;
    }

    #cutout {
        display: none; /* Hide the decorative cutout on mobile to save space */
    }

    /* 4. BETTER THUMBNAILS (Horizontal Scroll) */
    .thumbnail {
        display: flex;
        grid-column: auto; /* Reset grid positioning */
        width: 100%;
        overflow-x: auto; /* Allow horizontal scrolling */
        gap: 10px;
        justify-content: flex-start;
        padding-bottom: 10px; /* Space for scrollbar touch */
        margin-top: 0;
        scrollbar-width: none; /* Hide scrollbar Firefox */
    }
    
    .thumbnail::-webkit-scrollbar { 
        display: none; /* Hide scrollbar Chrome/Safari */
    }

    .thumbnail img {
        width: 85px; /* Fixed square size */
        height: 70px;
        border-radius: 10px;
        flex-shrink: 0; /* Prevent squishing */
    }

    /* 5. FIX WONKY SECTIONS (Reset Grid Columns) */
    #prodets, 
    .prospec, 
    .line, 
    .morepro {
        grid-column: auto; /* Stop trying to span 2 columns */
        width: 100%;
        margin-top: 20px;
    }

    .speccontent {
        grid-template-columns: 1fr; /* Stack specifications */
        gap: 20px;
    }

    .spec {
        padding: 20px; /* Consistent padding */
        width: 100%;
        box-sizing: border-box;
    }

    /* 6. RELATED PRODUCTS (2 Columns, Smaller Images) */
    .products-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Force 2 columns */
        gap: 15px; /* Tighter gap */
        justify-content: center;
    }

    .products-grid > * {
        flex: none; /* Disable the desktop flex logic */
        max-width: none;
        width: 100%;
    }

    .product-card {
        width: 100%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Lighter shadow */
    }

    .product-image {
        height: 100px; /* Much smaller image height */
    }
    
    .product-info {
        padding: 10px; /* Reduce padding */
    }

    .product-name {
        font-size: 0.9rem; /* Smaller text to fit 2 lines */
        margin-bottom: 5px;
    }
    
    .product-price {
        font-size: 1rem;
    }
}
