
/* ========= PRODUCT LAYOUT WITH INFO PANEL ========= */
.product-layout {
    display: flex;
    gap: 30px;
    margin: 20px 0 40px;
    min-height: 60vh;
}

/* Info Panel - Left Side (Desktop only) */
.hover-info-panel {
    width: 22%;
    background: linear-gradient(135deg, rgb(238 251 240 / 66%), rgb(255 255 255));
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(45, 106, 79, 0.1);
    padding: 20px 18px;
    height: 60vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    transition: all 0.3s ease;
    border: 1px solid rgba(45, 106, 79, 0.12);
}

.hover-info-panel::-webkit-scrollbar {
    width: 6px;
}

.hover-info-panel::-webkit-scrollbar-track {
    background: #d4e8e0;
    border-radius: 10px;
}

.hover-info-panel::-webkit-scrollbar-thumb {
    background: #2d6a4f;
    border-radius: 10px;
}

.panel-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #8B5E3C;
    margin-bottom: 15px;
}

.panel-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2d6a4f, #1b4d3e);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.panel-header p {
    font-size: 0.7rem;
    color: #8B5E3C;
    margin-top: 5px;
}

.hover-content {
    text-align: center;
}

.hover-dal-image {
    width: 90px;
    height: 90px;
    border-radius: 45px;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    box-shadow: 0 8px 20px rgba(45, 106, 79, 0.15);
    border: 3px solid #8b5e3c9c;
}

.hover-dal-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d6a4f;
    text-align: center;
}

.hover-dal-subname {
    font-size: 0.7rem;
    color: #784621f0;
    text-align: center;
    margin-top: 3px;
}

/* ========= NUTRITION CHART SECTION ========= */
.nutrition-chart-section {
    background: linear-gradient(135deg, rgb(103 205 158 / 23%), rgb(255 255 255));
    border-radius: 20px;
    padding: 15px;
    margin: 12px 0;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.06);
      border: 1px solid rgb(106 82 45 / 24%);
}

.chart-header {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #2d6a4f;
    margin-bottom: 10px;
}

.chart-header i {
    color: #8B5E3C;
    margin-right: 6px;
}

.chart-subtitle {
    font-size: 0.6rem;
    font-weight: normal;
    color: #8B5E3C;
}

.chart-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

/* Macro Stats Row */
.macro-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e0f0ea;
    flex-wrap: wrap;
    gap: 10px;
}

.macro-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
}

.macro-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.macro-item.protein .macro-dot { background: #2d6a4f; }
.macro-item.carbs .macro-dot { background: #c9a63c; }
.macro-item.fat .macro-dot { background: #e87a5e; }

.macro-label {
    color: #8B5E3C;
}

.macro-value {
    font-weight: 700;
    color: #2d6a4f;
}

/* Additional Nutrients - Now ABOVE calories */
.additional-nutrients {
    display: flex;
    justify-content: space-around;
    gap: 4px;
    margin: 12px 0 8px 0;
    padding: 10px 8px;
    background: linear-gradient(135deg, rgb(103 205 158 / 23%), rgb(255 255 255));
    border-radius: 16px;
       border: 1px solid rgb(106 82 45 / 24%);
}

.nutrient-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    color: #555;
}

.nutrient-item i {
    color: #2d6a4f;
    font-size: 0.6rem;
}

.nutrient-item span {
    font-weight: 600;
    color: #8b5e3c;
}

/* Calorie Info - Now BELOW additional nutrients */
.calorie-info {
    text-align: center;
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 6px;
    background:linear-gradient(135deg, rgb(103 205 158 / 23%), rgb(255 255 255));
    border-radius: 30px;
    border: 1px solid rgb(106 82 45 / 24%);
    font-size: 0.8rem ;
    font-weight: 600;
    color: #8B5E3C;
}

.calorie-info i {
    margin-right: 4px;
}

/* ========= PRICE SECTION ========= */
.price-section {
    background: linear-gradient(135deg, rgb(103 205 158 / 23%), rgb(255 255 255));
    border-radius: 16px;
    padding: 12px;
    border: 1px solid rgb(106 82 45 / 24%);
    text-align: center;
    margin: 12px 0;
}

.price-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #2d6a4f;
    margin-bottom: 6px;
}

.price-header i {
    margin-right: 4px;
}

.price-value-large {
    font-size: 1.6rem;
    font-weight: 800;
    color: #8B5E3C;
    line-height: 1;
}

.price-unit {
    font-size: 0.65rem;
    color: #784621f0;
    margin-top: 4px;
}

.price-month {
    font-size: 0.6rem;
    color: #2d6a4f;
    margin-top: 4px;
}

/* ========= PURPOSE SECTION ========= */
.purpose-section {
    background: linear-gradient(135deg, rgb(103 205 158 / 23%), rgb(255 255 255));
    border-radius: 16px;
    padding: 12px;
    margin: 12px 0;
    text-align: center;
    border: 1px solid rgb(106 82 45 / 24%);
}

.purpose-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #2d6a4f;
    margin-bottom: 8px;
}

.purpose-header i {
    margin-right: 4px;
}

.purpose-text {
    font-size: 0.75rem;
    color: #8B5E3C;
    line-height: 1.5;
}

/* ========= ORIGIN SECTION ========= */
.origin-section {
    background: linear-gradient(135deg, rgb(103 205 158 / 23%), rgb(255 255 255));
    border-radius: 16px;
    border: 1px solid rgb(106 82 45 / 24%);
    padding: 12px;
    margin: 12px 0;
    text-align: center;
}

.origin-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #2d6a4f;
    margin-bottom: 6px;
}

.origin-header i {
    margin-right: 4px;
}

.origin-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: #8B5E3C;
}

/* ========= CLEAR BUTTON ========= */
.clear-selection-btn {
    width: 100%;
    margin-top: 12px;
    background: linear-gradient(135deg, #e8f0ec, #dcebe4);
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    color: #2d6a4f;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.clear-selection-btn:hover {
    background: linear-gradient(135deg, #2d6a4f, #1b4d3e);
    color: white;
}

/* ========= HINT TEXT ========= */
.hint-text {
    font-size: 0.6rem;
    color: #8B5E3C;
    text-align: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #c8ddd2;
}

.hint-text i {
    font-size: 0.55rem;
    color: #2d6a4f;
}

/* ========= NO SELECTION STATE ========= */
.no-selection-state {
    text-align: center;
    padding: 40px 20px;
    color: #8aa69a;
}

.no-selection-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #2d6a4f;
    opacity: 0.4;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========= RIGHT COLUMN ========= */
.grid-container {
    width: 78%;
    height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.grid-container::-webkit-scrollbar {
    width: 6px;
}

.grid-container::-webkit-scrollbar-track {
    background: #d4e8e0;
    border-radius: 10px;
}

.grid-container::-webkit-scrollbar-thumb {
    background: #2d6a4f;
    border-radius: 10px;
}

/* Main Grid - 3 Columns */
.main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 10px 0 20px;
}

/* ========= CARD DESIGN ========= */
.card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(45, 106, 79, 0.12);
}

.card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-image-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #eef5f1, #dcebe4);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.35), rgba(27, 77, 62, 0.31));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .image-overlay {
    opacity: 1;
}

.quick-view {
    background: white;
    color: #2d6a4f;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-view:hover {
    background: linear-gradient(135deg, #2d6a4f, #1b4d3e);
    color: white;
    transform: translateY(0) scale(1.05);
}

.card:hover .quick-view {
    transform: translateY(0);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #c9a63c, #2d6a4f);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.9);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    color: #999;
}

.card-wishlist:hover {
    background: #2d6a4f;
    color: white;
    transform: scale(1.1);
}

.card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgb(238 251 240 / 66%), rgb(255 255 255));
    gap: 12px;
}

.card-header {
    text-align: left;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #8B5E3C;
    margin-bottom: 4px;
}

.product-subtitle {
    font-size: 0.7rem;
    color: #2d6a4f;
    font-weight: 500;
    background: #eef5f1;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

.product-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.feature-chip {
    background: linear-gradient(135deg, rgb(103 205 158 / 23%), rgb(255 255 255));
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #1b4d3e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.75rem;
    color:#8B5E3C;
}

.info-row i {
    color: #2d6a4f;
    font-size: 0.7rem;
    margin-top: 2px;
    min-width: 16px;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.price-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgb(103 205 158 / 23%), rgb(255 255 255));
    padding: 5px 12px;
    border-radius: 25px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #1b4d3e;
}

.details-btn {
    background: linear-gradient(95deg, #2d6a4f, #1b4d3e);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.details-btn:hover {
    background: linear-gradient(95deg, #1b4d3e, #143d30);
    transform: translateX(3px);
}

/* ========= RESPONSIVE DESIGN ========= */
@media (max-width: 768px) {
    .product-layout {
        display: block;
        min-height: auto;
    }
    
    .hover-info-panel {
        display: none;
    }
    
    .grid-container {
        width: 100%;
        height: auto;
        overflow-y: visible;
        padding-right: 0;
    }
    
    .main {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .card-image {
        height: 160px;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .product-features {
      display: flex;
    }
    
    .product-info {
      display: flex;
    }
    
    .card-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .price-indicator {
        width: 100%;
        justify-content: center;
    }
    
    .details-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main { 
        grid-template-columns: 1fr; 
    }
}