/**
 * NFC Products - Frontend Styles
 * Responsive product grid with modern design
 * 
 * Brand Guidelines:
 * - Titles: 22px Manrope
 * - Text: 18px Inter
 * - Colors: White, Black, Blue (#4a9eff)
 */

/* ============================================
   Typography
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

/* ============================================
   Grid Container
   ============================================ */
.nfc-products-grid {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

/* Grid Columns - Responsive */
.nfc-products-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.nfc-products-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.nfc-products-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.nfc-products-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.nfc-products-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.nfc-products-grid[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

/* ============================================
   Product Card
   ============================================ */
.nfc-product-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nfc-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #4a9eff;
}

/* Featured Product Styling */
.nfc-product-card.nfc-featured {
    border: 2px solid #4a9eff;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.2);
}

.nfc-product-card.nfc-featured:hover {
    box-shadow: 0 8px 24px rgba(74, 158, 255, 0.3);
}

/* ============================================
   Badges
   ============================================ */
.nfc-featured-badge,
.nfc-sale-badge {
    position: absolute;
    top: 15px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 10;
    letter-spacing: 0.5px;
}

.nfc-featured-badge {
    left: 15px;
    background: #4a9eff;
    color: #ffffff;
}

.nfc-sale-badge {
    right: 15px;
    background: #dc3232;
    color: #ffffff;
}

/* ============================================
   Product Image
   ============================================ */
.nfc-product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
    aspect-ratio: 1 / 1;
}

.nfc-product-image-wrapper a {
    display: block;
    height: 100%;
}

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

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

.nfc-product-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
    color: #999;
    font-size: 14px;
    text-decoration: none;
}

/* ============================================
   Product Content
   ============================================ */
.nfc-product-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.nfc-product-title {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    line-height: 1.4;
}

.nfc-product-title a {
    color: #000000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nfc-product-title a:hover {
    color: #4a9eff;
}

.nfc-product-description {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* ============================================
   Product Features
   ============================================ */
.nfc-product-features {
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
}

.nfc-product-features li {
    padding: 6px 0 6px 20px;
    position: relative;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: #555;
    line-height: 1.5;
}

.nfc-product-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4a9eff;
    font-weight: bold;
}

.nfc-product-features li.nfc-more-features {
    color: #4a9eff;
    font-weight: 600;
    font-style: italic;
}

.nfc-product-features li.nfc-more-features:before {
    content: "⋯";
}

/* ============================================
   Product Footer (Price & Button)
   ============================================ */
.nfc-product-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.nfc-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nfc-current-price,
.nfc-sale-price {
    font-size: 24px;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    color: #4a9eff;
}

.nfc-regular-price {
    font-size: 18px;
    color: #999;
}

.nfc-strikethrough {
    text-decoration: line-through;
}

.nfc-product-button {
    display: inline-block;
    padding: 10px 20px;
    background: #4a9eff;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.nfc-product-button:hover {
    background: #2878d9;
    color: #ffffff;
}

/* ============================================
   Pagination
   ============================================ */
.nfc-products-pagination {
    margin: 40px 0;
    text-align: center;
}

.nfc-products-pagination .page-numbers {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nfc-products-pagination .page-numbers li {
    display: inline-block;
}

.nfc-products-pagination a,
.nfc-products-pagination span {
    display: inline-block;
    padding: 10px 15px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.nfc-products-pagination a:hover {
    background: #4a9eff;
    color: #ffffff;
    border-color: #4a9eff;
}

.nfc-products-pagination .current {
    background: #4a9eff;
    color: #ffffff;
    border-color: #4a9eff;
}

/* ============================================
   No Results Message
   ============================================ */
.nfc-products-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    color: #666;
    background: #f8f8f8;
    border-radius: 8px;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .nfc-products-grid[data-columns="3"],
    .nfc-products-grid[data-columns="4"],
    .nfc-products-grid[data-columns="5"],
    .nfc-products-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nfc-products-grid {
        gap: 20px;
    }
    
    .nfc-product-title {
        font-size: 20px;
    }
    
    .nfc-product-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nfc-product-button {
        text-align: center;
        width: 100%;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .nfc-products-grid[data-columns="2"],
    .nfc-products-grid[data-columns="3"],
    .nfc-products-grid[data-columns="4"],
    .nfc-products-grid[data-columns="5"],
    .nfc-products-grid[data-columns="6"] {
        grid-template-columns: 1fr;
    }
    
    .nfc-products-grid {
        gap: 15px;
    }
    
    .nfc-product-content {
        padding: 15px;
    }
    
    .nfc-featured-badge,
    .nfc-sale-badge {
        top: 10px;
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .nfc-featured-badge {
        left: 10px;
    }
    
    .nfc-sale-badge {
        right: 10px;
    }
}

/* ============================================
   Loading States & Animations
   ============================================ */
.nfc-product-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nfc-product-card {
    animation: fadeIn 0.5s ease-out;
}

/* Stagger animation for multiple cards */
.nfc-product-card:nth-child(1) { animation-delay: 0.05s; }
.nfc-product-card:nth-child(2) { animation-delay: 0.1s; }
.nfc-product-card:nth-child(3) { animation-delay: 0.15s; }
.nfc-product-card:nth-child(4) { animation-delay: 0.2s; }
.nfc-product-card:nth-child(5) { animation-delay: 0.25s; }
.nfc-product-card:nth-child(6) { animation-delay: 0.3s; }

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .nfc-product-button,
    .nfc-products-pagination {
        display: none;
    }
    
    .nfc-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nfc-product-card {
        break-inside: avoid;
    }
}
