/* Home page styles for Deal Radar.
- Header with animated radar icon.
- Product grid, search, empty state, and "How it works" section.
- Responsive design for all screen sizes.
*/

/* Header
   - Large gradient background, animated radar icon, and subtitle.
*/

/* Search Section
   - Styled search bar and button for product search.
*/

/* Product Grid
   - Responsive grid for displaying product cards.
*/

/* Product Card
   - Card styling, hover effects, price, and tracking badge.
*/

/* Empty State
   - Shown when no products match the search/filter.
*/

/* Admin Controls
   - Special section for admin actions.
*/

/* "How it works" Section
   - Explains app workflow with cards and icons.
*/

/* Responsive Design
   - Adjusts grid, header, and controls for mobile/tablet.
*/

/* Home page - matching your beautiful original design */

/* Header with inline radar animation */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 80px 40px;
    border-radius: 25px;
    margin-bottom: 40px;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.header h1 {
    font-size: 3.5em;
    margin: 0 0 20px 0;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Inline radar animation - replaces the dartboard emoji */
.radar-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: radarSpin 3s linear infinite, radarGlow 2s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

@keyframes radarSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes radarGlow {
    0% {
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.8));
    }
}

.header p {
    font-size: 1.3em;
    margin: 0 0 10px 0;
    opacity: 0.95;
    font-weight: 300;
}

.subtitle {
    font-size: 1.1em !important;
    font-style: italic;
    opacity: 0.8 !important;
    margin-top: 10px !important;
}

/* Search section styling */
.search-container { 
    background: #c3cae9; 
    padding: 15px 20px; 
    border-radius: 16px; 
    margin-bottom: 40px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.08); 
}

.search-container h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 25px;
    font-weight: 600;
}

.search-form { 
    display: flex; 
    gap: 15px; 
    align-items: center;
}

.search-input { 
    flex: 1; 
    padding: 15px 20px; 
    border: 2px solid #e9ecef; 
    border-radius: 12px; 
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.search-btn { 
    padding: 15px 30px; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
    border: none; 
    border-radius: 12px; 
    cursor: pointer; 
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Section headers */
h2 {
    color: #333;
    font-size: 1.8em;
    margin: 40px 0 25px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* Product grid */
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); 
    gap: 30px; 
    margin-bottom: 40px;
}

.product { 
    background: #d6daec; 
    padding: 30px; 
    border-radius: 20px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.08); 
    transition: all 0.4s ease;
    border: 1px solid #f8f9fa;
}

.product:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.product h3 {
    color: #333;
    font-size: 1.4em;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.price { 
    font-size: 2.2em; 
    font-weight: 700; 
    color: #5b1169; 
    margin: 20px 0; 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.product p {
    color: #666;
    line-height: 1.6;
    margin: 12px 0;
    font-size: 15px;
}

.product p strong {
    color: #333;
    font-weight: 600;
}

/* Highlight search terms */
mark { 
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%); 
    padding: 3px 6px; 
    border-radius: 4px;
    font-weight: 600;
}

/* Empty state */
.empty-state {
    text-align: center; 
    padding: 80px 40px; 
    background: white; 
    border-radius: 20px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    margin: 40px 0;
}

.empty-state h3 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.empty-state p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Admin controls */
.admin-controls {
    text-align: center; 
    margin-top: 50px; 
    padding: 40px; 
    background: #c3cae9; 
    border-radius: 20px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.admin-controls h3 {
    color: #333;
    font-size: 1.6em;
    margin-bottom: 25px;
}

/* Button groups */
.product .btn {
    margin: 5px;
    padding: 8px 16px;
    font-size: 13px;
}

/* Search results info */
.search-container p {
    margin-top: 20px;
    color: #666;
    font-weight: 500;
}

.search-container p strong {
    color: #333;
}

/* Tracking badge */
.tracking-badge {
    color: #28a745;
    font-size: 12px;
    font-weight: 600;
    background: #d4edda;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    display: inline-block;
}

/* Small button variant */
.btn-small {
    font-size: 12px !important;
    padding: 6px 12px !important;
}

/* Product image styling */
.product-img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem auto;
    background: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* --- HOW IT WORKS SECTION --- */
.how-it-works-section {
    background: #e6e6fa;
    padding: 2.5rem 0 2rem 0;
    margin-bottom: 2rem;
}

.how-it-works-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #5a4fcf;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    width: 100%;
    display: block;
}

.how-it-works-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.how-it-works-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(90,79,207,0.07);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    width: 320px;
    max-width: 90vw;
    text-align: center;
    transition: box-shadow 0.2s;
}

.how-it-works-card:hover {
    box-shadow: 0 4px 24px rgba(90,79,207,0.15);
}

.how-it-works-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #5a4fcf;
}

.how-it-works-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #5a4fcf;
}

.how-it-works-card p {
    color: #444;
    font-size: 1rem;
    margin: 0;
}

/* Responsive design */
@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 900px) {
    .header {
        padding: 40px 10px;
    }
    .header h1 {
        font-size: 2.2em;
        flex-direction: column;
        gap: 10px;
    }
    .radar-icon {
        width: 48px;
        height: 48px;
    }
    .how-it-works-cards {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .how-it-works-card {
        width: 95vw;
        max-width: 400px;
    }
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .product {
        padding: 20px 10px;
    }
    .logo-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    .logo-card img {
        max-width: 80px;
        height: auto;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5em;
        flex-direction: column;
        gap: 15px;
    }
    .radar-icon {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 2em;
    }
    .radar-icon {
        width: 40px;
        height: 40px;
    }
    .product-img {
        width: 100%;
        max-width: 220px;
        height: auto;
        min-height: 120px;
    }
    .search-form {
        flex-direction: column;
        gap: 10px;
    }
    .search-btn, .btn, .btn-small {
        width: 100%;
        font-size: 1em !important;
        padding: 12px 0 !important;
    }
    .search-input {
        width: 100%;
        font-size: 1em;
    }
    .admin-controls, .empty-state {
        padding: 20px 5px;
    }
}