/* Products Page Styles */

/* Force Light Mode for products page */
html {
    color-scheme: only light !important;
}

/* Products Page Header */
.products-page {
    padding-top: 160px;
    padding-bottom: 80px;
    min-height: 100vh;
    background: #F8F9FA;
}

.products-page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2C3E50;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.1rem;
    color: #7F8C8D;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 50px;
    padding: 15px 25px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 8px 35px rgba(247, 146, 30, 0.2);
    transform: translateY(-2px);
}

.search-icon {
    color: #F7921E;
    font-size: 1.2rem;
    margin-right: 15px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #2C3E50;
    background: transparent;
}

.search-box input::placeholder {
    color: #B0B0B0;
}

.clear-search {
    background: none;
    border: none;
    color: #7F8C8D;
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.clear-search:hover {
    color: #E74C3C;
}

.search-results-count {
    text-align: center;
    margin-top: 1rem;
    color: #7F8C8D;
    font-size: 0.9rem;
}

/* Products Grid */
.products-grid,
#products-grid,
.products-page .products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}

@media (max-width: 1024px) {
    .products-grid,
    #products-grid,
    .products-page .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 0 20px !important;
    }
}

@media (max-width: 768px) {
    .products-grid,
    #products-grid,
    .products-page .products-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Product Card */
.product-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #F7921E 0%, #E67E22 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card-image {
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.product-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 0.75rem;
    font-family: 'Poppins', sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-card > p {
    color: #7F8C8D;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.product-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.product-card-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #7F8C8D;
    font-size: 0.9rem;
}

.product-card-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #F7921E;
    font-weight: bold;
}

.product-card-footer {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.product-card-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.product-card-btn.primary {
    background: var(--primary-color);
    color: white;
}

.product-card-btn.primary:hover {
    background: #e07f12;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(247, 146, 30, 0.3);
}

.product-card-btn.secondary {
    background: var(--secondary-color);
    color: white;
}

.product-card-btn.secondary:hover {
    background: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.2);
}

@media (max-width: 480px) {
    .product-card-footer {
        flex-direction: column;
        gap: 8px;
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #2C3E50;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: #7F8C8D;
    margin-bottom: 1.5rem;
}

.show-all-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #F7921E 0%, #E67E22 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(247, 146, 30, 0.4);
}

/* Back Home Button */
.back-home-wrapper {
    text-align: center;
    margin-top: 3rem;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 15px 30px;
    background: #2C3E50;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    background: #34495E;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(44, 62, 80, 0.3);
}

/* More Products Button (Homepage) */
.more-products-wrapper {
    text-align: center;
    margin-top: 3rem;
}

.more-products-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 15px 35px;
    background: linear-gradient(135deg, #F7921E 0%, #E67E22 100%);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(247, 146, 30, 0.3);
}

.more-products-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(247, 146, 30, 0.4);
}

.more-products-btn i {
    transition: transform 0.3s ease;
}

.more-products-btn:hover i {
    transform: translateX(5px);
}

/* Dark Mode Overrides for Products Page */
@media (prefers-color-scheme: dark) {
    .products-page {
        background: #F8F9FA !important;
    }
    
    .page-title {
        color: #2C3E50 !important;
    }
    
    .page-description {
        color: #7F8C8D !important;
    }
    
    .search-box {
        background: #FFFFFF !important;
    }
    
    .search-box input {
        color: #2C3E50 !important;
    }
    
    .product-card {
        background: #FFFFFF !important;
    }
    
    .product-card h3 {
        color: #2C3E50 !important;
    }
    
    .product-card > p,
    .product-card-features li {
        color: #7F8C8D !important;
    }
    
    .product-card-btn,
    .more-products-btn,
    .show-all-btn {
        background: linear-gradient(135deg, #F7921E 0%, #E67E22 100%) !important;
        color: #FFFFFF !important;
    }
    
    .no-results {
        background: #FFFFFF !important;
    }
    
    .no-results h3 {
        color: #2C3E50 !important;
    }
    
    .no-results p {
        color: #7F8C8D !important;
    }
    
    .back-home-btn {
        background: #2C3E50 !important;
        color: #FFFFFF !important;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .products-page {
        padding-top: 100px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .products-page .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-card {
        padding: 1.5rem;
    }
    
    .product-card-icon {
        font-size: 2.5rem;
    }
    
    .product-card h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .search-box {
        padding: 12px 20px;
    }
    
    .search-box input {
        font-size: 0.9rem;
    }
    
    .more-products-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(247, 146, 30, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(247, 146, 30, 0.5);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.product-card {
    animation: fadeInUp 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }