﻿/* ===============================
    GLOBAL & RESET
================================ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f6f3;
    color: #2f3e2f;
}

/* ===============================
    LAYOUT: 65/35 SPLIT
================================ */
.purchase-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 20px; /* Reduced gap to make it thinner */
    align-items: flex-start;
}

/* LEFT COLUMN: Plant Info + Reviews */
.main-content-column {
    flex: 0 0 65%; /* Increased width */
    display: flex;
    flex-direction: column;
    gap: 30px;
}


/* RIGHT COLUMN: Cart Summary */
.bill-summary {
    flex: 0 0 35%; /* Decreased width to balance */
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    position: sticky; /* Keeps cart visible on scroll */
    top: 20px;
    z-index: 100;
    overflow: hidden;
}

/* ===============================
    PLANT INFO CARD
================================ */
.plant-info {
    width: 100%;
    background: #fff;
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.05);
}

/* ===============================
    IMAGE SECTION (SIDE-BY-SIDE)
================================ */
.image-section {
    display: flex;
    flex-direction: row; 
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
}

/* Updated Container: The "Frame" for the plant */
.primary-image-box,
.secondary-image-box,
.zoom-container {
    position: relative;
    width: 100%;
    max-width: 350px;      
    height: 350px;         
    border: 1px solid #ddd;
    background-color: #fff;
    display: block;        
    overflow: hidden;      /* Critical: Clips the 5x zoom so it stays in the card */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    cursor: zoom-in;
}

/* Requirement 1: Image Fills the Entire Frame */
.primary-img, 
.secondary-img,
.zoom-target {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;     /* Forces the plant photo to fill every corner */
    display: block;
    /* transition: transform 0.4s ease; /* Smooth but responsive for heavy zoom */
    transform-origin: center center;
}

/* ===============================
    MAGNIFYING GLASS & RIBBON
================================ */

.zoomLens {
    border: 2px solid #2f6f4e !important; /* Green border for the glass */
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.digital-ribbon {
    position: absolute;
    top: 15px;              
    left: -35px;
    width: 160px;
    text-align: center;
    background: linear-gradient(135deg, #ff8c00, #ff6600);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 0;
    transform: rotate(-35deg); 
    box-shadow: 2px 3px 6px rgba(0,0,0,0.2);
    z-index: 20; /* Keeps ribbon above the 5x zoomed image */
    letter-spacing: 0.5px;
    pointer-events: none;    
}
/* ===============================
    PRODUCT CONTENT
================================ */
.product-description {
    background: linear-gradient(180deg,#f9fcf9,#f1f5f0);
    border-left: 4px solid #2f6f4e;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 18px;
}

.product-description h3 {
    margin: 0 0 8px;
    color: #1b5e20;
    font-size: 15px;
}

.desc-text {
    font-size: 14px;
    line-height: 1.7;
}

.variety-gallery label {
    display: block;
    font-family: 'Tenor Sans', sans-serif;
    font-size: 16px;
    color: #1b4d3e;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    border-left: 3px solid #c9a44c;
    padding-left: 10px;
}

.price {
    font-size: 24px;
    color: #2f6f4e;
    font-weight: 700;
    margin: 20px 0;
}

.instock {
    color: #2e7d32;
    font-weight: 600;
}

/* ===============================
    CONTROLS & BUTTONS
================================ */
.qty-control {
    display: inline-flex;
    align-items: center;
    background: #f1f4f1;
    border-radius: 30px;
    padding: 6px 12px;
    margin-right: 15px;
}

.qty-control button {
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    color: #2f6f4e;
}

.qty-box {
    width: 45px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
}

.add-cart-btn {
    padding: 14px 35px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg,#3f7d5c,#2f6f4e);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.add-cart-btn:hover {
    transform: scale(1.03);
}

/* ===============================
    STAMP SELECTION
================================ */
/* Container Label */
.selection-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stamp Grid */
.stamp-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Individual Stamp */
.stamp-item {
    position: relative;
    width: 100px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stamp-inner {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    text-align: center;
    padding-bottom: 8px;
}

.stamp-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
}

.size-badge {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    padding-top: 6px;
}

/* Selected State */
.stamp-item.selected .stamp-inner {
    border: 2px solid #2e7d32; /* Deep Nature Green */
    background-color: #f1f8e9;
}

.stamp-item.selected::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #2e7d32;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stamp-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===============================
    CART SUMMARY DETAILS
================================ */
.bill-summary h3 {
    margin: 0;
    padding: 18px 24px;
    background: linear-gradient(135deg,#2f6f4e,#3f7d5c);
    color: #fff;
    font-size: 18px;
}

.bill-grid {
    width: 100%;
    border-collapse: collapse;
}

.bill-grid th, .bill-grid td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px dashed #e0e5df;
}

.cart-total-footer {
    padding: 20px;
    background: #f9fcf9;
}

.total-amount {
    font-size: 22px;
    font-weight: 800;
    color: #2f6f4e;
}

.btn-place-order {
    width: 90%;
    margin: 0 5% 20px 5%;
    padding: 15px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* ===============================
    REVIEWS SECTION
================================ */
.reviews-section { 
    margin-top: 20px; 
    background: #fff;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.05);
}

.rating-summary { display: flex; align-items: center; gap: 40px; margin: 20px 0; }
.avg-num { font-size: 48px; font-weight: bold; color: #1b5e20; }
.rating-bars { flex-grow: 1; max-width: 300px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 5px; }
.bar-bg { background: #eee; height: 10px; flex-grow: 1; border-radius: 5px; overflow: hidden; }
.bar-fill { background: #c9a44c; height: 100%; width: 0%; transition: width 0.8s; }

.review-form { background: #f9fcf9; padding: 25px; border-radius: 15px; margin: 25px 0; border: 1px solid #eef2ee; }
.review-input { width: 100%; margin-bottom: 12px; padding: 12px; border-radius: 8px; border: 1px solid #ddd; }
.review-item { border-bottom: 1px solid #eee; padding: 20px 0; }
.stars { color: #c9a44c; margin-left: 10px; font-size: 1.1em; }

/* ===============================
    MOBILE RESPONSIVE
================================ */
@media (max-width: 992px) {
    .purchase-wrapper {
        flex-direction: column;
    }
    .main-content-column, .bill-summary {
        flex: 0 0 100%;
        width: 100%;
    }
    .image-section {
        flex-direction: column;
    }
    .bill-summary {
        position: static;
        margin-top: 30px;
    }
}
/* Container for the images to prevent them from "bleeding" out when scaling */
.main-image-container, .secondary-image-item {
    overflow: hidden; /* This is the secret sauce */
    border-radius: 12px;
    cursor: zoom-in;
}

/* The actual image transition */
.main-image-container img, .secondary-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth ease-out */
}

/* The Hover Effect */
.main-image-container:hover img, .secondary-image-item:hover img {
    transform: scale(1.5); /* 1.5 is a "much larger" zoom. Adjust to 1.2 or 2.0 as needed */
}
/* The container prevents the zoomed image from covering other elements */
.zoom-container {
    position: relative;
    overflow: hidden; /* Clips the image as it expands */
    border-radius: 12px; /* Matches your nursery theme */
    cursor: zoom-in;
}

/* Base state of the images */
.zoom-target {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth "boutique" feel */
}



/* Ensure the variety badge stays on top and doesn't zoom */
.variety-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    pointer-events: none; /* Allows mouse to trigger zoom even if over the badge */
}
@media (max-width: 768px) {

    /* ===== FORCE SINGLE COLUMN LAYOUT ===== */
    .purchase-wrapper {
        display: block !important;   /* VERY IMPORTANT */
        width: 100% !important;
        max-width: 100% !important;
    }

    .main-content-column {
        width: 100% !important;
    }

    .bill-summary {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 20px;   /* space after product section */
    }

    /* Ensure nothing pushes page sideways */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }
}
@media (max-width: 768px) {

    /* Make table columns narrower */
    .bill-grid th,
    .bill-grid td {
        padding: 6px 4px !important;
        font-size: 12px;
    }

    /* Make Remove (X) button smaller and visible */
    .remove-btn {
        padding: 2px 4px !important;
        font-size: 12px !important;
        min-width: 24px;
        text-align: center;
    }

    /* Reduce width of columns */
    .bill-grid th:nth-child(1), 
    .bill-grid td:nth-child(1) { /* Item */
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bill-grid th:nth-child(2), 
    .bill-grid td:nth-child(2) { /* Variety */
        max-width: 90px;
    }

    .bill-grid th:nth-child(3), 
    .bill-grid td:nth-child(3) { /* Rate */
        max-width: 70px;
    }

    .bill-grid th:nth-child(4), 
    .bill-grid td:nth-child(4) { /* Qty */
        max-width: 40px;
    }

    .bill-grid th:nth-child(5), 
    .bill-grid td:nth-child(5) { /* Amount */
        max-width: 80px;
    }

    .bill-grid th:last-child,
    .bill-grid td:last-child { /* Remove column */
        max-width: 40px;
        text-align: center;
    }
}
.variety-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    pointer-events: none; /* Allows mouse to trigger zoom even if over the badge */
}
@media (max-width: 768px) {

    /* ===== FORCE SINGLE COLUMN LAYOUT ===== */
    .purchase-wrapper {
        display: block !important;   /* VERY IMPORTANT */
        width: 100% !important;
        max-width: 100% !important;
    }

    .main-content-column {
        width: 100% !important;
    }

    .bill-summary {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 20px;   /* space after product section */
    }

    /* Ensure nothing pushes page sideways */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }
}
@media (max-width: 768px) {

    /* Make table columns narrower */
    .bill-grid th,
    .bill-grid td {
        padding: 6px 4px !important;
        font-size: 12px;
    }

    /* Make Remove (X) button smaller and visible */
    .remove-btn {
        padding: 2px 4px !important;
        font-size: 12px !important;
        min-width: 24px;
        text-align: center;
    }

    /* Reduce width of columns */
    .bill-grid th:nth-child(1), 
    .bill-grid td:nth-child(1) { /* Item */
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bill-grid th:nth-child(2), 
    .bill-grid td:nth-child(2) { /* Variety */
        max-width: 90px;
    }

    .bill-grid th:nth-child(3), 
    .bill-grid td:nth-child(3) { /* Rate */
        max-width: 70px;
    }

    .bill-grid th:nth-child(4), 
    .bill-grid td:nth-child(4) { /* Qty */
        max-width: 40px;
    }

    .bill-grid th:nth-child(5), 
    .bill-grid td:nth-child(5) { /* Amount */
        max-width: 80px;
    }

    .bill-grid th:last-child,
    .bill-grid td:last-child { /* Remove column */
        max-width: 40px;
        text-align: center;
    }
}
.secondary-image-box {
    position: relative;
    overflow: hidden;
}

.digital-ribbon {
    position: absolute;
    top: -5px;              /* ⬆️ moved little upward */
    left: -38px;
    width: 170px;
    text-align: center;
    background: linear-gradient(135deg, #ff8c00, #ff6600); /* orange */
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 0;
    transform: rotate(-16deg);
    box-shadow: 2px 3px 6px rgba(0,0,0,0.25);
    z-index: 10;
    letter-spacing: 0.6px;

    /* 🌊 WAVY EFFECT */
    clip-path: polygon(
        0% 0%,
        10% 10%,
        25% 0%,
        40% 10%,
        55% 0%,
        70% 10%,
        85% 0%,
        100% 10%,
        100% 90%,
        85% 100%,
        70% 90%,
        55% 100%,
        40% 90%,
        25% 100%,
        10% 90%,
        0% 100%
    );
}

.digital-ribbon:before,
.digital-ribbon:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.7);
    left: 0;
}

.digital-ribbon:before { top: 3px; }
.digital-ribbon:after { bottom: 3px; }

/* Quantity bounce */
.qty-bounce {
    animation: bounce 0.3s ease;
}

@keyframes bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Voice button active */
.voice-btn.listening {
    background-color: #ff4b4b !important;
}

/* Smooth image fade */
.zoom-container img {
    transition: opacity 0.3s ease;
}

/* Cart highlight animation */
.bill-grid-wrapper {
    transition: box-shadow 0.3s ease;
}

.bill-grid-wrapper.cart-updated {
    box-shadow: 0 0 15px rgba(46,125,50,0.3);
}
/* Similar Products Card */
.similar-products-card {
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.similar-products-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-left: 4px solid #2f6f4e;
    padding-left: 15px;
}

.elegant-arrow-btn {
    text-decoration: none;
    color: #b8860b; /* Gold accent to match your brand */
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.elegant-arrow-btn:hover {
    color: #2f6f4e;
    transform: translateX(5px);
}

.similar-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.similar-item {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid #f0f0f0;
}

.similar-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.similar-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.similar-item-info {
    padding: 10px;
    text-align: center;
}

.item-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2f3e2f;
}

.item-price {
    color: #2f6f4e;
    font-weight: 700;
    font-size: 13px;
}
/* Similar Products Stamp Section */
.similar-products-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #e8ede8;
    margin: 20px 0;
}

.section-header-elegant {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.section-header-elegant h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #2f6f4e;
    margin: 0;
}

.view-all-link {
    text-decoration: none;
    color: #b8860b;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
}

.view-all-link:hover {
    color: #2f6f4e;
    transform: translateX(3px);
}

/* The Stamp Grid */
.stamp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.plant-stamp {
    cursor: pointer;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f2f2f2;
    text-align: center;
}

.plant-stamp:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.stamp-photo {
    width: 100%;
    height: 100px; /* Small stamp height */
    overflow: hidden;
}

.stamp-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stamp-details {
    padding: 8px 5px;
}

.stamp-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stamp-price {
    display: block;
    font-size: 0.8rem;
    color: #2f6f4e;
    font-weight: 700;
    margin-top: 2px;
}

/* Mobile Adjustment */
@media (max-width: 600px) {
    .stamp-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 stamps per row on mobile */
        gap: 10px;
    }
}
//* Mobile Reveal Styles */
@media (max-width: 768px) {
    .header {
        transition: transform 0.3s ease-in-out, background-color 0.3s;
        will-change: transform;
    }

    /* Ensure the search bar row inside the nav is visible */
    .mobile-nav-search {
        display: block !important;
        background: white;
    }

    /* Prevent content from hiding behind fixed elements */
    .nav-scrolled {
        border-bottom: 1px solid #ddd;
    }

    /* Important: Ensure Logo is always visible */
    .header-logo img {
        max-height: 40px;
        width: auto;
    }
}
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3000;
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.purchase-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.cart-status-msg {
    font-size: 13px;
    font-weight: 600;
    color: #2f6f4e; /* Deep botanical green */
    background: #e8f5e9;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #c8e6c9;
    animation: fadeInSlide 0.4s ease-out;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}
/* Remove any existing .zoom-container or .magnify-glass classes */

/* Modal Styles for Image Preview */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content-img {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border: 3px solid #d4af37;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.message-label {
    display: block;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-family: 'Tenor Sans', sans-serif;
    font-size: 14px;
    text-align: center;
    animation: fadeInDown 0.4s ease;
}

.message-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}