/* =====================================
   GLOBAL THEME
   ===================================== */
:root {
    --primary: #4CAF50;
    --primary-dark: #3e8e41;
    --text: #333;
    --text-light: #666;
    --bg: #fafafa;
    --card-bg: #fff;
    --border: #e5e5e5;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
}

body {
    background: var(--bg);
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}


/* =====================================
   PRODUCT PAGE WRAPPER
   ===================================== */
.product-container {
    max-width: 1200px;
    margin: 120px auto 50px auto;
    padding: 20px;
    display: flex;
    gap: 40px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


/* -------------------------------------
   MAIN IMAGE ONLY
   ------------------------------------- */
#mainImage {
    width: 100%;
    max-width: 450px;
    height: 450px;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: block;
    transition: transform 0.3s ease;
    touch-action: manipulation;
}

/* Touch zoom */
#mainImage:active {
    transform: scale(1.15);
}


/* -------------------------------------
   THUMBNAIL STRIP
   ------------------------------------- */
.extra-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.extra-images .thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease;
    border: 2px solid transparent;
}

.extra-images .thumb:hover {
    transform: scale(1.1);
    border-color: white;}


/* -------------------------------------
   PRODUCT DETAILS
   ------------------------------------- */
.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-details h1 {
    font-size: 2.3rem;
    margin-bottom: 15px;
    color: var(--text);
}


/* PRODUCT DESCRIPTION */
.product-description {
    white-space: pre-wrap;        /* Respect line breaks & spacing */
    word-wrap: break-word;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2e2e2e;

    background: linear-gradient(
        to right,
        rgba(76, 175, 80, 0.08),
        rgba(76, 175, 80, 0.02)
    );

    padding: 18px 20px;
    margin-bottom: 24px;

    border-left: 4px solid var(--primary);
    border-radius: 8px;

    font-family: "Poppins", system-ui, -apple-system, sans-serif;
    letter-spacing: 0.2px;
}

/* Subtle paragraph spacing when user presses Enter */
.product-description br {
    display: block;
    margin-bottom: 10px;
}

/* Mobile refinement */
@media (max-width: 600px) {
    .product-description {
        font-size: 1rem;
        padding: 15px;
        line-height: 1.7;
    }
}



/* PRICE */
.product-price {
    font-size: 2.2rem;
    font-weight: bold;
    color: rgb(65, 64, 64);
    margin-bottom: 25px;
}


/* LABELS & SELECT */
.product-details label {
    display: block;
    font-size: 1rem;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text);
}

.product-details select {
    background: #fff;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    margin-bottom: 20px;
    font-size: 1rem;
}


.quantity-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.quantity-box input {
    width: 70px;
    height: 40px;
    text-align: center;
    font-size: 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: black;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 22px;
    cursor: pointer;
    transition: 0.2s;
}

.qty-btn:hover {
    background: #555;
}

@media (max-width: 480px) {
    .quantity-box input {
        width: 55px;
    }
    .qty-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}



/* ADD TO CART BUTTON */
.add-cart-btn {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: 0.25s ease;
}

.add-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}


/* =====================================
   FOOTER
   ===================================== */
footer {
    margin-top: 60px;
    background: transparent;
}

.footer-heading {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--text);
}

.products-grid {
    justify-content: center;

    align-items: center;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    padding: 30px 0;
}

.product-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.product-box:hover {
    transform: translateY(-5px);
}

.product-box img {
    height: 160px;
    width: 100%;
    object-fit: contain;
    margin-bottom: 10px;
}

.product-box .name {
    font-weight: bold;
    color: var(--text);
}


/* Continue Shopping Button */
.continue-shopping-btn {
    background: var(--primary);
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.25s;
}

.continue-shopping-btn:hover {
    background: var(--primary-dark);
}


/* =====================================
   RESPONSIVE MEDIA QUERIES
   ===================================== */
@media (max-width: 992px) {
    .product-container {
        flex-direction: column;
        text-align: center;
        margin: 80px auto 40px auto;
    }

    #mainImage {
        max-width: 100%;
        height: 350px;
    }

    .product-description {
        border-left: none;
        border-top: 4px solid var(--primary);
    }
}

@media (max-width: 600px) {

    .product-details h1 {
        font-size: 1.8rem;
    }

    .product-price {
        font-size: 1.7rem;
    }

    .product-container {
        padding: 15px;
        margin: 60px 10px;
    }

    #mainImage {
        height: 280px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
