/* ── Product overview grid ── */
.productoverview {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding: 20px;
}

/* ── Smoke glass product card ── */
.item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 550px;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;

    /* Glass effect */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);

    /* Smoke border */
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);

    /* Subtle inner glow using housestyle-green */
    outline: 1px solid rgba(38, 150, 111, 0.15);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;

    position: relative;
}

/* Shimmer overlay on top edge */
.item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(38, 150, 111, 0.7),
        rgba(128, 5, 112, 0.5),
        transparent
    );
    border-radius: 20px 20px 0 0;
    z-index: 2;
}

/* Subtle smoke gradient inside card */
.item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.01) 40%,
        rgba(0, 0, 0, 0.08) 100%
    );
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

.item:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(38, 150, 111, 0.5);
    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(38, 150, 111, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ── Image area ── */
.productdiv {
    width: 100%;
    height: 220px;        /* fixed px cap — never shrinks the info section */
    flex-shrink: 0;       /* don't let flexbox squeeze it */
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.productdiv img,
.product_thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s ease;
}

/* Placeholder when no image */
.product_thumb--placeholder {
    background: linear-gradient(135deg, rgba(38,150,111,0.15), rgba(128,5,112,0.1));
    width: 100%;
    height: 100%;
}

.item:hover .product_thumb {
    transform: scale(1.04);
}

/* ── Link wrapper — transparent to flex layout ── */
.item_link {
    display: contents;
    text-decoration: none;
    color: inherit;
}

/* ── Cart row pinned to bottom ── */
.item_cart {
    flex-shrink: 0;
    padding: 0 16px 14px;
    position: relative;
    z-index: 3;
}

/* ── Item info section ── */
.iteminfo {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    overflow: hidden;
    padding: 14px 16px 8px;
    position: relative;
    z-index: 2;
}

/* Quantity input */
.qty_input {
    width: 52px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(38, 150, 111, 0.35);
    background: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Product name ── */
.product_name {
    font-size: 15px;
    font-weight: 700;
    color: var(--royal-blue);
    margin-bottom: 6px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── Product data / description / price ── */
.product_data {
    width: 100%;
    font-size: 13px;
    color: rgba(51, 50, 56, 0.75);
    flex: 1;
    overflow: hidden;
}

#product_description {
    font-size: 13px;
    color: rgba(51, 50, 56, 0.7);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
}

#product_price {
    font-size: 18px;
    font-weight: 800;
    color: var(--housestyle-green);
    letter-spacing: -0.02em;
}

/* ── Product detail / info ── */
.productinfo {
    display: block;
    width: 100%;
    height: 100%;
    padding: 16px;
    overflow: auto;
}

/* ── Add-to-cart controls ── */
.shoppingcart_add {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    position: relative;
    z-index: 3;
}

.btn_add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    padding: 8px 12px;
    z-index: 3;
    font-size: 13px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--housestyle-green), rgba(38, 150, 111, 0.8));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(38, 150, 111, 0.3);
}

.btn_add:hover {
    background: linear-gradient(135deg, var(--housestyle-purple), rgba(128, 5, 112, 0.85));
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(128, 5, 112, 0.35);
}

/* ── Admin panel strip ── */
.adminpanel {
    display: block;
    background: var(--housestyle-green);
    border-radius: 0 0 10px 10px;
    padding: 4px 8px;
    font-size: 12px;
}

/* ── Star summary bar (always visible, clickable) ── */
.star-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(38, 150, 111, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease;
    user-select: none;
}

.star-summary:hover {
    background: rgba(38, 150, 111, 0.12);
    border-color: rgba(38, 150, 111, 0.5);
}

.star-display {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.15s ease;
}
.star--filled { color: #f7b731; }
.star--empty  { color: rgba(0, 0, 0, 0.18); }

.star-summary:hover .star--filled {
    transform: scale(1.15);
}

.star-avg {
    font-size: 16px;
    font-weight: 700;
    color: var(--royal-blue);
}

.star-count {
    font-size: 13px;
    color: rgba(51, 50, 56, 0.6);
}

.star-chevron {
    font-size: 14px;
    color: rgba(51, 50, 56, 0.5);
    transition: transform 0.25s ease;
    margin-left: 2px;
}

/* ── Expandable breakdown ── */
.rating-breakdown {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
    overflow: hidden;
}

.rating-breakdown--open {
    grid-template-rows: 1fr;
}

.rating-progress {
    min-height: 0;         /* required for grid collapse trick */
    padding: 12px 4px 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.star-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.star-label {
    font-size: 13px;
    color: rgba(51, 50, 56, 0.7);
    width: 36px;
    flex-shrink: 0;
    text-align: right;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--housestyle-green), #4ade80);
    border-radius: 99px;
    transition: width 0.6s ease;
}

.star-count-sm {
    font-size: 12px;
    color: rgba(51, 50, 56, 0.5);
    width: 24px;
    flex-shrink: 0;
}

/* ── Individual reviews ── */
.review-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review {
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.review-author {
    font-size: 14px;
    color: var(--royal-blue);
}

.review-stars .star { font-size: 15px; }

.review-comment {
    font-size: 13px;
    color: rgba(51, 50, 56, 0.75);
    margin: 0;
}

.no-reviews {
    font-size: 13px;
    color: rgba(51, 50, 56, 0.5);
    font-style: italic;
}

/* ── Add review button ── */
.btn-review {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--housestyle-green), rgba(38,150,111,0.8));
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-review:hover {
    background: linear-gradient(135deg, var(--housestyle-purple), rgba(128,5,112,0.85));
}

/* ── Staggered fade-in animation ── */
@keyframes cardReveal {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.item {
    animation: cardReveal 0.4s ease both;
}
.item:nth-child(1)  { animation-delay: 0.00s; }
.item:nth-child(2)  { animation-delay: 0.05s; }
.item:nth-child(3)  { animation-delay: 0.10s; }
.item:nth-child(4)  { animation-delay: 0.15s; }
.item:nth-child(5)  { animation-delay: 0.20s; }
.item:nth-child(6)  { animation-delay: 0.25s; }
.item:nth-child(7)  { animation-delay: 0.30s; }
.item:nth-child(8)  { animation-delay: 0.35s; }
.item:nth-child(9)  { animation-delay: 0.40s; }
.item:nth-child(10) { animation-delay: 0.45s; }
.item:nth-child(11) { animation-delay: 0.50s; }
.item:nth-child(12) { animation-delay: 0.55s; }
