/* Styles to fix product page layout */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    width: 100%;
    display: block;
}

.products-section {
    padding: 60px 0;
    min-height: calc(100vh - 300px);
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.products-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.main-footer {
    flex-shrink: 0;
    width: 100%;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 35px;
    margin-bottom: 80px;
}

/* Product Card */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

/* Grade Badge */
.grade-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.875rem;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grade-specific colors */
.product-card[data-grade="3"] .grade-badge {
    background: linear-gradient(135deg, #56CCF2 0%, #2F80ED 100%);
}

.product-card[data-grade="4"] .grade-badge {
    background: linear-gradient(135deg, #A8E063 0%, #56AB2F 100%);
}

.product-card[data-grade="5"] .grade-badge {
    background: linear-gradient(135deg, #FFB75E 0%, #ED8F03 100%);
}

.product-card[data-grade="6"] .grade-badge {
    background: linear-gradient(135deg, #FA709A 0%, #FEE140 100%);
}

.product-card[data-grade="7"] .grade-badge {
    background: linear-gradient(135deg, #9796F0 0%, #FBC7D4 100%);
}

.product-card[data-grade="8"] .grade-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-card[data-grade="9"] .grade-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.product-card[data-grade="10"] .grade-badge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Product Image */
.product-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.image-overlay {
    display: none;
}

.age-tag {
    display: none;
}

/* Product Content */
.product-content {
    padding: 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-content h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
}

.product-short-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
    margin: 0;
    flex-grow: 1;
}

/* Product Footer */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.price {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: translateX(3px);
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
    padding: 40px 0;
}

.info-card {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.info-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* No Products Message */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 992px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .products-section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-content {
        padding: 16px;
    }
    
    .product-content h3 {
        font-size: 1.1rem;
    }
    
    .price {
        font-size: 1.25rem;
    }
    
    .btn-primary {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 220px;
    }
    
    .info-section {
        grid-template-columns: 1fr;
    }
}
