@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600&display=swap');

:root {
    /* Green and Turquoise-themed color palette */
    --color-primary: #0D9488; /* Deep teal/turquoise */
    --color-primary-light: #2DD4BF; /* Lighter turquoise for hover states */
    --color-danger: #EF4444; /* Kept original red for contrast */
    --color-success: #10B981; /* Emerald green */
    --color-warning: #FFBA49; /* Kept original */
    --color-white: #fff;
    --color-info-dark: #545454;
    --color-dark: #1F2937; /* Slightly darker for better readability */
    --color-light: rgba(13, 148, 136, 0.1); /* Teal with low opacity */
    --color-dark-variant: #4B5563;
    --color-background: #F0FDF4; /* Soft mint green background */
    --color-sidebar: #E6F3F0; /* Lighter mint shade for sidebar */
    
    /* Secondary palette */
    --color-cork: #6EE7B7; /* Soft mint green */
    --color-aged-white: #D1FAE5; /* Very light mint */
    --color-grape: #065F46; /* Deep emerald green */

    --card-border-radius: 1.2rem;
    --border-radius-1: 0.4rem;
    --border-radius-2: 0.8rem;

    --card-padding: 1.8rem;
    --padding-1: 1.2rem;

    --box-shadow: 0 1rem 2rem rgba(13, 148, 136, 0.1);
    --transition-speed: 300ms;

    --color-primary-rgb: 13, 148, 136;
    --color-grape-rgb: 6, 95, 70;
}

.dark-mode-variables {
    --color-background: #064E3B; /* Deep green for dark mode */
    --color-white: #065F46; /* Slightly lighter green */
    --color-dark: #ECFDF5; /* Very light mint for text */
    --color-dark-variant: #6EE7B7; /* Soft mint green */
    --color-light: rgba(13, 148, 136, 0.2);
    --box-shadow: 0 2rem 3rem rgba(13, 148, 136, 0.2);
}

* {
    margin: 0;
    padding: 0;
    appearance: none;
    border: 0;
    text-decoration: none;
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

body {
    scroll-behavior: smooth;
    width: auto;
    height: auto;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    user-select: none;
    overflow-x: hidden;
    color: var(--color-dark);
    background-color: var(--color-background);
}

a {
    color: var(--color-dark);
}

img{
    display: block;
    width: 100%;
    object-fit: cover;
}

h1 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

small{
    font-size: 0.76rem;
}

p{
    color: var(--color-dark-variant);
}

b{
    color: var(--color-dark);
}

.text-muted{
    color: var(--color-info-dark);
}

.primary{
    color: var(--color-primary);
}

.danger{
    color: var(--color-danger);
}

.success{
    color: var(--color-success);
}

.warning{
    color: var(--color-warning);
}

.container{
    display: grid;
    width: 96%;
    margin: 0 auto;
    padding-bottom: 80px;
    gap: 1.8rem;
    grid-template-columns: 12rem auto 28rem;
}

/* ============== SIDEBAR ================ */

aside {
    height: 100vh;
    position: sticky;
    top: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

aside .toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.4rem;
    position: relative;
    z-index: 10;
}

aside .toggle .logo{
    display: flex;
    gap: 0.5rem;
}

aside .toggle .logo img{
    width: 5.5rem;
    height: 2.5rem;
    margin-left: 2rem;
    transition: transform var(--transition-speed) ease;
}

aside .toggle .logo img:hover {
    transform: scale(1.1);
}

aside .toggle .close{
    padding-right: 1rem;
    display: none;
}

aside .sidebar{
    display: flex;
    flex-direction: column;
    background-color: var(--color-white);
    box-shadow: var(--box-shadow);
    border-radius: 15px;
    height: 88vh;
    position: relative;
    top: 1.5rem;
    transition: all var(--transition-speed) ease;
}

aside .sidebar:hover{
    box-shadow: 0 1rem 3rem rgba(138, 32, 72, 0.15);
}

aside .sidebar a{
    display: flex;
    align-items: center;
    color: var(--color-info-dark);
    height: 3.7rem;
    gap: 1rem;
    position: relative;
    margin-left: 2rem;
    transition: all var(--transition-speed) ease;
}

aside .sidebar a span{
    font-size: 1.6rem;
    transition: all var(--transition-speed) ease;
}

aside .sidebar a:last-child{
    position: absolute;
    bottom: 2rem;
    width: 100%;
}

aside .sidebar a.active {
    width: 100%;
    color: var(--color-primary);
    background-color: var(--color-light);
    margin-left: 0;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    border-top-left-radius: 16px;
}

aside .sidebar a.active::before{
    content: '';
    width: 6px;
    height: 18px;
    left: 0;
    top: 50%;
    background-color: var(--color-primary);
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-top-left-radius: 10px;
}

aside .sidebar a.active span{
    color: var(--color-primary);
    margin-left: 20px;
}

aside .sidebar a:hover{
    color: var(--color-primary);
}

aside .sidebar a:hover span{
    margin-left: 0.6rem;
    color: var(--color-primary-light);
}

aside .sidebar .notification-dot{
    position: absolute;
    top: 8px;
    right: 20px;
    width: 12px;
    height: 12px;
    background-color: #4CAF50;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: none;
}

/* ============== MAIN SECTION ================ */

main{
    margin-top: 1.8rem;
}

main .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

main .product-card {
    background-color: var(--color-white);
    border-radius: var(--card-border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

main .product-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 1.5rem 3rem rgba(138, 32, 72, 0.2);
}

main .product-card .product-image {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: var(--card-border-radius);
    border-top-right-radius: var(--card-border-radius);
    transition: transform 0.5s ease;
}

main .product-card:hover .product-image {
    transform: scale(1.05);
}

main .product-card .product-detail {
    padding: 1.5rem;
}

main .product-card .product-name {
    color: var(--color-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

main .product-card .product-price {
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

main .product-card .product-rating {
    color: var(--color-warning);
    margin-bottom: 0.5rem;
}

main .product-card .product-description {
    color: var(--color-dark-variant);
    font-size: 0.85rem;
}

/* ============== RIGHT SECTION ================ */

.right {
    margin: 1.4rem;
}

.right .conversation {
    font-size: 1.2rem;
    width: 65%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: var(--color-primary);
    margin-bottom: 1.2rem;
}

.right .conversation span {
    color: var(--color-primary);
}

.right .recent-conv .update {
    background: var(--color-white);
    padding: var(--card-padding);
    border-radius: var(--card-border-radius);
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed) ease;
    margin-bottom: 1rem;
    cursor: pointer;
}

.right .recent-conv .update:hover {
    box-shadow: none;
    transform: translateX(-0.25rem);
}

.right .recent-conv .update .profile-photo img {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.8rem;
    border-radius: 50%;
    border: 2px solid var(--color-primary-light);
    transition: all var(--transition-speed) ease;
}

.right .recent-conv .update:hover .profile-photo img {
    transform: scale(1.1);
}

.right .recent-conv .update{
    display: grid;
    grid-template-columns: 2.6rem auto;
    gap: 1rem;
}

.right .recent-conv .update .message small {
    display: flex;
    justify-content: flex-end;
}

.recent-conv a{
    text-align: center;
    display: block;
    margin: 1rem auto;
    color: var(--color-primary);
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.recent-conv a:hover {
    color: var(--color-primary-light);
    transform: translateY(-2px);
}

.right .tracking {
    margin-top: 3.8rem;
}

.right .tracking h2 {
    margin-bottom: 1.2rem;
    color: var(--color-primary);
}

.right .tracking .item {
    background-color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.7rem;
    padding: 1.4rem var(--card-padding);
    border-radius: var(--card-border-radius);
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

.right .tracking .item:hover {
    box-shadow: none;
    transform: translateX(-0.25rem);
}

.right .tracking .item .right {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin: 0;
    width: 100%;
}

.right .tracking .item .icon {
    padding: 0.8rem;
    color: var(--color-white);
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    transition: all var(--transition-speed) ease;
}

.right .tracking .item:hover .icon {
    transform: scale(1.1);
}

.right .tracking .item.arrived .icon {
    background: var(--color-success);
}

.right .tracking .item.recurring-buy .icon {
    background: var(--color-grape);
}

/* Wine bottle decoration */
.product-card::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 10px;
    width: 20px;
    height: 5px;
    background-color: var(--color-cork);
    border-radius: 2px;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.product-card:hover::before {
    opacity: 1;
}

/* Product Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.8rem;
    margin-top: 1.5rem;
}

/* Product Card Base */
.product-card {
    position: relative;
    background-color: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 550px; /* Fixed minimum height for consistency */
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(138, 32, 72, 0.15);
}

/* Card Header */
.product-card-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.producer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 0.75rem;
    border: 2px solid var(--color-primary-light);
}

.producer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.producer-info {
    flex: 1;
}

.producer-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-dark);
    margin-bottom: 0.2rem;
}

.post-time {
    font-size: 0.75rem;
    color: var(--color-dark-variant);
}

.more-options {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.more-options:hover {
    background-color: var(--color-light);
}

/* Product Image Container */
.product-image-container {
    position: relative;
    width: 100%;
    height: 220px; /* Fixed height for all images */
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Badges */
.product-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background-color: var(--color-primary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(138, 32, 72, 0.3);
}

.product-origin-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--color-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Product Actions */
.product-actions {
    display: flex;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    align-items: center;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    margin-right: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-button:hover {
    background-color: var(--color-light);
    transform: scale(1.1);
}

.action-button i {
    font-size: 1.4rem;
    color: var(--color-dark);
}

.action-button.like:hover i {
    color: var(--color-primary);
}

.action-button.cart:hover i {
    color: var(--color-success);
}

.price-tag {
    margin-left: auto;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-primary);
    background-color: var(--color-light);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

/* Product Content */
.product-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
    line-height: 1.4;
    height: 2.8em; /* Fixed height for two lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-meta {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-dark-variant);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.product-meta .separator {
    margin: 0 0.4rem;
}

/* Rating style */
.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.4rem;
}

.rating-stars {
    display: flex;
}

.rating-stars i {
    color: var(--color-warning);
    font-size: 0.9rem;
}

.rating-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-dark);
}

.rating-count {
    font-size: 0.8rem;
    color: var(--color-dark-variant);
}

/* Product description */
.product-description {
    font-size: 0.9rem;
    color: var(--color-dark-variant);
    margin-bottom: 0.75rem;
    line-height: 1.5;
    flex-grow: 1;
    height: 4.5em; /* Fixed height for 3 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.read-more {
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* Product hashtags */
.product-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-hashtag {
    color: var(--color-primary);
    font-size: 0.85rem;
    cursor: pointer;
    background-color: rgba(var(--color-primary-rgb), 0.07);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.product-hashtag:hover {
    background-color: rgba(var(--color-primary-rgb), 0.15);
}

/* Call-to-action buttons */
.product-cta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-add-to-cart {
    flex: 1;
    background-color: var(--color-primary);
    color: white;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
}

.btn-add-to-cart:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--color-primary-rgb), 0.3);
}

.btn-favorite {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background-color: var(--color-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-favorite:hover {
    background-color: rgba(var(--color-primary-rgb), 0.15);
    transform: translateY(-2px);
}

.btn-favorite i {
    font-size: 1.2rem;
}

/* Animation for button interactions */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.action-button.adding {
    animation: pulse 0.5s ease;
}

/* Media queries for responsiveness */
@media screen and (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        min-height: 500px;
    }
    
    .product-image-container {
        height: 200px;
    }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    padding: 0.75rem 1rem;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.quick-action {
    display: flex;
    align-items: center;
    margin-right: 1rem;
    color: var(--color-dark-variant);
    font-size: 0.8rem;
}

.quick-action i {
    font-size: 1.2rem;
    margin-right: 0.3rem;
}

.quick-action.like:hover {
    color: var(--color-primary);
}

.quick-action.cart:hover {
    color: var(--color-success);
}

.price-tag {
    margin-left: auto;
    font-weight: 600;
    color: var(--color-primary);
}

/* Product Brief */
.product-brief {
    padding: 0.75rem 1rem 1rem;
}

.product-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: var(--color-dark);
}

.product-meta {
    font-size: 0.75rem;
    color: var(--color-dark-variant);
    margin-bottom: 0.5rem;
}

.rating-preview {
    display: flex;
    align-items: center;
}

.rating-preview .stars {
    display: flex;
    margin-right: 0.5rem;
}

.rating-preview .stars i {
    color: var(--color-warning);
    font-size: 0.8rem;
}

.rating-preview span {
    font-size: 0.8rem;
    font-weight: 500;
}

/* ============== ANIMATIONS ================ */

/* Subtle pulse animation for notification badges */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notification-dot {
    animation: pulse 2s infinite;
}

/* Fade-in animation for components */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card, .update, .item, .sidebar a {
    animation: fadeIn 0.5s ease backwards;
}

/* Stagger the animations */
.product-card:nth-child(1), .update:nth-child(1), .item:nth-child(1), .sidebar a:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2), .update:nth-child(2), .item:nth-child(2), .sidebar a:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3), .update:nth-child(3), .item:nth-child(3), .sidebar a:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4), .update:nth-child(4), .item:nth-child(4), .sidebar a:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5), .update:nth-child(5), .item:nth-child(5), .sidebar a:nth-child(5) { animation-delay: 0.5s; }

/* Wine glass tilting effect */
@keyframes wineTilt {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

.conversation h2:hover {
    animation: wineTilt 1s ease;
    display: inline-block;
}

/* ============== MEDIA QUERIES ================ */

@media screen and (max-width: 1200px) {
    .container{
        width: 95%;
        grid-template-columns: 7rem auto 23rem;
    }

    aside .logo h2{
        display: none;
    }

    aside .sidebar h3{
        display: none;
    }

    aside .sidebar a{
        width: 5.6rem;
    }

    aside .sidebar a:last-child{
        position: relative;
        margin-top: 1.8rem;
    }

    main .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .container{
        width: 100%;
        grid-template-columns: 1fr;
        padding: 0 var(--padding-1);
    }

    aside{
        position: fixed;
        background-color: var(--color-background);
        width: 15rem;
        z-index: 3;
        box-shadow: 1rem 3rem 4rem var(--color-light);
        height: 100vh;
        left: -100%;
        display: none;
        animation: showMenu 0.4s ease forwards;
    }

    @keyframes showMenu {
       to{
        left: 0;
       } 
    }

    aside .logo{
        margin-left: 1rem;
    }

    aside .logo h2{
        display: inline;
    }

    aside .sidebar h3{
        display: inline;
    }

    aside .sidebar a{
        width: 100%;
        height: 3.4rem;
    }

    aside .sidebar a:last-child{
        position: absolute;
        bottom: 5rem;
    }

    aside .toggle .close{
        display: inline-block;
        cursor: pointer;
    }

    main{
        margin-top: 8rem;
        padding: 0 1rem;
    }

    main .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ======== NEW WINE CARD DESIGN ======== */

/* Product Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Wine Card Base */
.product-card {
    background-color: var(--color-white);
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 560px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(138, 32, 72, 0.2);
    border-color: rgba(138, 32, 72, 0.05);
}

/* Image Section */
.product-image-wrapper {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.product-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.1) 100%
    );
}

/* Producer Badge */
.producer-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 2rem;
    padding: 0.3rem 0.8rem;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-card:hover .producer-badge {
    transform: translateY(-3px);
}

.producer-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--color-primary);
    margin-right: 0.5rem;
}

.producer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.producer-badge span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* Award Badge */
.product-badge {
    position: absolute;
    bottom: 4rem;
    left: 1rem;
    display: flex;
    align-items: center;
    background-color: var(--color-primary);
    color: white;
    border-radius: 2rem;
    padding: 0.35rem 0.8rem;
    z-index: 2;
    box-shadow: 0 3px 15px rgba(138, 32, 72, 0.3);
    animation: badgePulse 3s infinite;
}

@keyframes badgePulse {
    0% { box-shadow: 0 3px 15px rgba(138, 32, 72, 0.3); }
    50% { box-shadow: 0 3px 20px rgba(138, 32, 72, 0.5); }
    100% { box-shadow: 0 3px 15px rgba(138, 32, 72, 0.3); }
}

.badge-icon {
    margin-right: 0.4rem;
    font-size: 0.9rem;
}

.badge-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Country Badge */
.country-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 2rem;
    padding: 0.35rem 0.8rem;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-card:hover .country-badge {
    transform: translateY(-3px);
}

.country-badge i {
    color: var(--color-primary);
    font-size: 0.9rem;
    margin-right: 0.3rem;
}

.country-badge span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-dark);
}

/* Quick Action Buttons */
.quick-actions {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0.9;
}

.product-card:hover .action-btn {
    opacity: 1;
    transform: translateY(-3px);
}

.action-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.like-btn i {
    color: var(--color-primary);
    font-size: 1.1rem;
}

.cart-btn i {
    color: var(--color-success);
    font-size: 1.1rem;
}

.share-btn i {
    color: var(--color-dark-variant);
    font-size: 1.1rem;
}

/* Wine Details Section */
.wine-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: relative;
}

/* Wine Type Indicator */
.wine-type {
    position: absolute;
    top: -14px;
    left: 1.5rem;
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 1rem;
    padding: 0.35rem 0.8rem;
    display: flex;
    align-items: center;
}

.wine-type.red {
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.wine-type.white {
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.wine-type.sparkling {
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.wine-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.4rem;
}

.wine-type.red .wine-type-dot {
    background-color: #dc2626;
}

.wine-type.white .wine-type-dot {
    background-color: #eab308;
}

.wine-type.sparkling .wine-type-dot {
    background-color: #3b82f6;
}

.wine-type-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-dark);
}

/* Wine Name */
.wine-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-dark);
    margin: 0.8rem 0 0.5rem 0;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Wine Specs */
.wine-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.spec {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--color-dark-variant);
}

.spec i {
    margin-right: 0.35rem;
    font-size: 0.9rem;
    color: var(--color-primary);
}

/* Rating Container */
.rating-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    background-color: rgba(138, 32, 72, 0.05);
    padding: 0.5rem 0.8rem;
    border-radius: 0.5rem;
}

.stars {
    display: flex;
    margin-right: 0.5rem;
}

.stars i {
    color: var(--color-warning);
    font-size: 0.85rem;
}

.rating-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-dark);
    margin-right: 0.3rem;
}

.review-count {
    font-size: 0.75rem;
    color: var(--color-dark-variant);
}

/* Wine Description */
.wine-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-dark-variant);
    margin-bottom: 1rem;
    flex-grow: 1;
    height: 4.5em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.read-more {
    color: var(--color-primary);
    font-weight: 500;
    cursor: pointer;
}

.read-more:hover {
    text-decoration: underline;
}

/* Hashtags Container */
.hashtags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.product-hashtag {
    font-size: 0.75rem;
    color: var(--color-primary);
    background-color: rgba(138, 32, 72, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-hashtag:hover {
    background-color: rgba(138, 32, 72, 0.15);
    transform: translateY(-2px);
}

/* Price and CTA */
.price-action-container {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.price-container {
    flex: 1;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.3rem;
}

.discount-hint {
    display: flex;
    align-items: center;
    font-size: 0.7rem;
    color: var(--color-success);
}

.discount-hint i {
    margin-right: 0.25rem;
}

.add-to-cart-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.add-to-cart-btn:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(138, 32, 72, 0.3);
}

.add-to-cart-btn i {
    font-size: 1.1rem;
}

/* Custom Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeUp 0.5s ease backwards;
}

/* Staggered animations */
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .wine-name {
        font-size: 1rem;
    }
}

@media screen and (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
    
    .product-image-wrapper {
        height: 230px;
    }
    
    .wine-specs {
        gap: 0.6rem;
    }
    
    .spec {
        font-size: 0.75rem;
    }
}

/* Active states for interactive elements */
.action-btn.active {
    background-color: var(--color-primary);
}

.action-btn.like-btn.active i {
    color: white;
}

.action-btn.cart-btn.active i {
    color: white;
}

/* Add to cart animation */
@keyframes addedToCart {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.add-to-cart-btn.adding {
    animation: addedToCart 0.5s ease;
    background-color: var(--color-success);
}

/* Loading State Styles */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-light);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--color-dark-variant);
    font-size: 1rem;
    margin: 0;
}

/* Empty State Styles */
.no-products-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    grid-column: 1 / -1;
}

.empty-state {
    text-align: center;
    max-width: 400px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--color-dark-variant);
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state h3 {
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.empty-state p {
    color: var(--color-dark-variant);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

/* Error State Styles */
.error-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    grid-column: 1 / -1;
}

.error-state .empty-state i {
    color: var(--color-danger);
}

.retry-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-1);
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color var(--transition-speed) ease;
}

.retry-btn:hover {
    background-color: var(--color-primary-light);
}

/* Loading Note Styles */
.loading-note {
    grid-column: 1 / -1;
    padding: 1rem;
    margin-top: 1rem;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-1);
    font-size: 0.9rem;
    box-shadow: var(--box-shadow);
}

.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Special Offer Badge in Modal */
.wine-image-section {
    position: relative;
}

.special-offer-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #6bff8b, #24ee96);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Modal Special Offer Pricing */
.modal-content .pricing-special {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 1rem 0;
}

.modal-content .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.modal-content .price-row:last-child {
    margin-bottom: 0;
}

.modal-content .price-label {
    font-weight: 500;
    color: #495057;
}

.modal-content .price-value {
    font-weight: 600;
    color: #212529;
}

.modal-content .old-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9em;
}

.modal-content .special-price {
    color: #28a745;
    font-size: 1.2em;
}

.modal-content .savings {
    color: #dc3545;
    font-weight: 700;
}

.modal-content .offer-description {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    font-size: 0.9em;
    color: #856404;
    font-style: italic;
}

/* ============== SPECIAL OFFER STYLES ================ */

/* Special Offer Card Enhancement */
.product-card.has-special-offer {
    border: 2px solid var(--color-success);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
    position: relative;
}

.product-card.has-special-offer::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    z-index: 10;
}

/* Special Offer Pricing Section */
.pricing-special {
    background: var(--color-background);
    border: 2px solid var(--color-success);
    border-radius: 12px;
    padding: 1.2rem;
    margin: 1rem 0;
    position: relative;
}

.pricing-special .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.4rem 0;
}

.pricing-special .price-row:last-child {
    margin-bottom: 0;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}

.pricing-special .price-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-dark-variant);
}

.pricing-special .price-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.pricing-special .old-price {
    text-decoration: line-through;
    color: var(--color-dark-variant);
    font-size: 0.9rem;
    opacity: 0.7;
}

.pricing-special .special-price {
    color: var(--color-success);
    font-size: 1.3rem;
}

.pricing-special .savings {
    color: var(--color-primary);
    font-size: 1.1rem;
    font-weight: 800;
}

.pricing-special .offer-description {
    margin-top: 1rem;
    padding: 0.8rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--color-success);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--color-dark);
    font-style: italic;
    text-align: center;
}

/* Special Offer Badge in Product Card */
.product-card.has-special-offer .product-badge {
    background: var(--color-success);
}

/* Special Offer Hover Effects */
.product-card.has-special-offer:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.2);
}

/* Special Offer Button Enhancement */
.product-card.has-special-offer .add-to-cart-btn {
    background: var(--color-success);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    margin-top: 1rem;
    width: 100%;
}

.product-card.has-special-offer .add-to-cart-btn:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.product-card.has-special-offer .price-action-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Special Offer Price Highlight */
.product-card.has-special-offer .current-price {
    color: var(--color-success);
    font-size: 1.4rem;
    font-weight: 800;
}

.product-card.has-special-offer .price-container {
    margin-bottom: 0;
}

/* Special Offer Discount Hint */
.product-card.has-special-offer .discount-hint {
    background: var(--color-success);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Responsive Design for Special Offers */
@media screen and (max-width: 768px) {
    .product-card.has-special-offer::before {
        font-size: 0.65rem;
        padding: 4px 16px;
        top: -10px;
    }
    
    .pricing-special {
        padding: 1rem;
        margin: 0.8rem 0;
    }
    
    .pricing-special .price-row {
        margin-bottom: 0.6rem;
        padding: 0.3rem 0;
    }
    
    .pricing-special .price-label {
        font-size: 0.8rem;
    }
    
    .pricing-special .price-value {
        font-size: 1rem;
    }
    
    .pricing-special .special-price {
        font-size: 1.2rem;
    }
    
    .pricing-special .savings {
        font-size: 1rem;
    }
}

/* Special Offer Loading State */
.product-card.has-special-offer .loading-state {
    background: linear-gradient(135deg, #fff5f0, #ffe8e0);
    border: 2px solid #ff6b35;
}

/* Special Offer Empty State */
.product-card.has-special-offer .empty-state {
    background: linear-gradient(135deg, #fff5f0, #ffe8e0);
    border: 2px solid #ff6b35;
}

/* Special Offer Error State */
.product-card.has-special-offer .error-state {
    background: linear-gradient(135deg, #fff5f0, #ffe8e0);
    border: 2px solid #ff6b35;
}

/* ============== SPECIAL OFFER MODAL STYLES ================ */

/* Special Offer Badge in Modal */
.wine-image-section .special-offer-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--color-success);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    z-index: 10;
}

/* Special Offer Pricing in Modal */
.modal-content .pricing-special {
    background: var(--color-background);
    border: 2px solid var(--color-success);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.modal-content .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.modal-content .price-row:last-child {
    margin-bottom: 0;
    padding-top: 1rem;
    border-top: 2px solid rgba(16, 185, 129, 0.3);
}

.modal-content .price-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark-variant);
}

.modal-content .price-value {
    font-weight: 700;
    font-size: 1.2rem;
}

.modal-content .old-price {
    text-decoration: line-through;
    color: var(--color-dark-variant);
    font-size: 1rem;
    opacity: 0.7;
}

.modal-content .special-price {
    color: var(--color-success);
    font-size: 1.5rem;
}

.modal-content .savings {
    color: var(--color-primary);
    font-size: 1.3rem;
    font-weight: 800;
}

.modal-content .offer-description {
    margin-top: 1.2rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--color-success);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--color-dark);
    font-style: italic;
    text-align: center;
}

/* Special Offer Modal Button */
.modal-content .btn-add-to-cart {
    background: var(--color-success);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    margin-top: 1.5rem;
    width: 100%;
}

.modal-content .btn-add-to-cart:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Responsive Design for Special Offer Modal */
@media screen and (max-width: 768px) {
    .wine-image-section .special-offer-badge {
        font-size: 0.7rem;
        padding: 6px 12px;
        top: 8px;
        right: 8px;
    }

    .product-card.has-special-offer .add-to-cart-btn {
        margin-top: 0.8rem;
        padding: 0.8rem 1rem;
    }
    
    .modal-content .btn-add-to-cart {
        margin-top: 1.2rem;
        padding: 1rem 1.5rem;
    }
    
    .modal-content .pricing-special {
        padding: 1.2rem;
        margin: 1.2rem 0;
    }
    
    .modal-content .price-row {
        margin-bottom: 0.8rem;
        padding: 0.4rem 0;
    }
    
    .modal-content .price-label {
        font-size: 0.9rem;
    }
    
    .modal-content .price-value {
        font-size: 1.1rem;
    }
    
    .modal-content .special-price {
        font-size: 1.3rem;
    }
    
    .modal-content .savings {
        font-size: 1.2rem;
    }
    
    .modal-content .offer-description {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
}

/* ✅ STILI PER NOTIFICHE STOCK */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.stock-notification {
    font-family: var(--font-family);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.stock-notification button {
    transition: all 0.2s ease;
}

.stock-notification button:hover {
    opacity: 0.7;
    transform: scale(1.1);
}