/* ===================================
   DaniDeals - Neo-Modern Layout (V3)
   Theme: Electric Blue & Clean Slate
   font-family: 'Outfit', system-ui, sans-serif
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Palette */
    --primary-color: #2563eb;       /* Blue 600 - Trustworthy & Vocal */
    --primary-dark: #1d4ed8;        /* Blue 700 */
    --primary-soft: #dbeafe;        /* Blue 100 */

    --secondary-color: #0f172a;     /* Slate 900 - Deep & Corporate */
    
    --accent-color: #f43f5e;        /* Rose 500 - Playful highlights */
    
    /* Semantic Colors */
    --success-color: #059669;       /* Emerald 600 */
    --warning-color: #d97706;       /* Amber 600 */
    --danger-color: #dc2626;        /* Red 600 */
    
    /* Surfaces & Backgrounds */
    --bg-body: #f8fafc;             /* Slate 50 - Cool Light Grey */
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;            /* Slate 100 */

    /* Typography */
    --text-main: #334155;           /* Slate 700 */
    --text-heading: #0f172a;        /* Slate 900 */
    --text-muted: #94a3b8;          /* Slate 400 */
    --text-white: #ffffff;
    
    /* UI Elements */
    --border-color: #e2e8f0;        /* Slate 200 */
    --focus-ring: rgba(37, 99, 235, 0.4);

    /* Shadows (Soft & Diffused) */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);

    /* Borders */
    --radius-sm: 0.5rem;    /* 8px */
    --radius-md: 0.75rem;   /* 12px */
    --radius-lg: 1rem;      /* 16px */
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
}

/* ===================================
   LAYOUT UTILITIES
   =================================== */

.container {
    max-width: 1320px; /* Slightly wider for modern feel */
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    line-height: 1.25;
}

a { 
    text-decoration: none; 
    transition: all 0.2s ease;
}

/* ===================================
   HEADER
   =================================== */

header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Top Bar: Minimalist */
.header-top {
    background-color: var(--secondary-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.4rem 0;
    text-align: center;
    letter-spacing: 0.02em;
}

.header-top span { color: var(--text-white); font-weight: 500; }

/* Main Header */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

/* Logo: Bold & Geometric */
.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.logo span { color: var(--primary-color); }
.logo i { color: var(--primary-color); transform: rotate(-10deg); }

/* Search: Pill Shape & Clean */
.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
    z-index: 100; /* Ensure dropdown is above */
}

.search-bar form {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.25rem;
    transition: all 0.2s ease;
}

.search-bar form:focus-within {
    background: var(--bg-surface);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    color: var(--text-heading);
    outline: none;
    font-family: inherit;
}

.search-bar button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.search-bar button:hover { transform: scale(1.05); background: var(--primary-dark); }

/* Search Suggestions */
.search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    padding: 0.5rem;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-actions a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions a:hover { color: var(--primary-color); }

#fav-count {
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-full);
}

/* ===================================
   NAVIGATION (Compact Pills)
   =================================== */

nav {
    border-top: 1px solid var(--border-color);
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0.5rem; /* Minimal gap */
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: center;
    flex-wrap: nowrap;
}

.nav-menu::-webkit-scrollbar { display: none; }

.nav-menu li { flex-shrink: 0; }

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 9999px; /* Pill shape */
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-menu li a i {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.nav-menu li a:hover {
    background-color: var(--bg-input);
    color: var(--primary-color);
}

.nav-menu li a.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.nav-menu li a.active i {
    color: white; /* Icon white on active */
}

.nav-menu li a.active::after {
    display: none; 
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-heading);
    cursor: pointer;
}

/* ===================================
   HERO SECTIONS
   =================================== */

.hero {
    background: radial-gradient(circle at top right, #f8fafc, #f1f5f9);
    padding: 6rem 1.5rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero .container {
    position: relative;
    z-index: 2;
    max-width: 900px; /* Focus width */
}

/* Background Glow Effect */
.hero-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Badge Pill */
.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--primary-soft);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    animation: fadeInDown 0.8s ease-out;
}

/* Typography */
.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-heading);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.outline-text {
    color: var(--text-heading); 
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.highlight-mark {
    color: var(--danger-color);
    font-weight: 700;
    background: #fff1f2;
    padding: 0 4px;
    border-radius: 4px;
}

/* Hero Search */
.hero-search-wrapper {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-search-form {
    display: flex;
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-search-form:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.hero-search-form .search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    color: var(--text-muted);
}

.hero-search-form input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.75rem 0;
    color: var(--text-heading);
}

.hero-search-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-search-form button:hover {
    background: var(--primary-dark);
}

/* Tags */
.hero-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-tags a {
    color: var(--text-main);
    background: white;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    font-weight: 500;
}

.hero-tags a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .hero { padding: 4rem 1rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero-search-form button { padding: 0.75rem 1.5rem; }
}

/* ===================================
   PRODUCT CARD (THE NEW LOOK)
   =================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color); /* Visible border by default */
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

/* Image Container */
.product-image {
    position: relative;
    padding-top: 80%; /* Adjusted Aspect Ratio */
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    margin: 0;
    border-radius: 0;
}

.product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: translate(-50%, -50%) scale(1.05);       
}

/* Floating Actions */
.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--danger-color);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.fav-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    box-shadow: var(--shadow-md);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}

.fav-btn:hover { color: var(--accent-color); transform: scale(1.1); }

/* Info Area */
.product-info {
    padding: 0.75rem 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    margin-bottom: 0.25rem;
}

.product-category a {
    font-size: 0.7rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.product-title {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex-grow: 1; /* Push price down */
}

.product-title a { color: var(--text-heading); font-weight: 600; }
.product-title a:hover { color: var(--primary-color); }

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-body);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    width: max-content;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-heading);
}

.original-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.btn-primary {
    background-color: var(--text-heading);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    display: block;
    box-shadow: var(--shadow-sm);
    border: none;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ===================================
   TIMERS (DROPPING STYLE UPDATED)
   =================================== */

.timer-container {
    background: #fff1f2; /* Light rose bg */
    border: 1px solid #ffe4e6;
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.timer-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--danger-color);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.countdown-box {
    display: flex;
    gap: 0.5rem;
}

.time-unit {
    background: white;
    border: 1px solid #fda4af;
    color: var(--danger-color);
    width: 48px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0 #fda4af; /* Legacy 3D drop effect, but softer */
    transform: translateY(0);
    transition: transform 0.1s;
}

.time-unit:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #fda4af;
}

.time-val {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.time-txt {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.8;
}

/* ===================================
   PRODUCT DETAIL PAGE
   =================================== */
   
.product-detail-container {
    background-color: transparent !important; /* Override inline styles */
    box-shadow: none !important;
    gap: 2rem !important; /* Reduced space */
}

/* Override inline styles via Class specificity */
.detail-image {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.detail-info {
    padding-top: 0;
}

.detail-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--text-heading);
    letter-spacing: -0.01em;
    line-height: 1.3 !important;
    margin: 5px 0 10px 0 !important;
}

.detail-price-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin: 15px 0 !important;
}

.detail-final-price {
    color: var(--primary-color) !important;
    font-size: 2rem !important;
}

/* Coupon Reveal Button Style */
#show-coupon-btn {
    background: var(--secondary-color) !important;
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-md) !important;
    transition: all 0.2s;
    padding: 12px !important;
}

#show-coupon-btn:hover {
    background: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Bullet Points */
.detail-bullets {
    background: #f0f9ff;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 20px !important;
}

.detail-bullets h3 {
    margin-top: 0;
    color: var(--primary-color) !important;
}

.detail-bullets ul li {
    position: relative;
    padding-left: 0.5rem;
}

/* ===================================
   FOOTER
   =================================== */

footer {
    background-color: var(--secondary-color);
    color: #94a3b8;
    padding-top: 5rem;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

/* Footer Top Grid */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-section h3 {
    color: var(--text-white);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Social Icons */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

.footer-bottom p {
    margin: 0;
}

/* Responsive Header Mobile */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: white;
        padding: 1rem;
        box-shadow: var(--shadow-xl);
        border-top: 1px solid var(--border-color);
    }
    .nav-menu.active { display: flex; }
    .menu-toggle { display: block; }
    
    .header-content { flex-wrap: wrap; gap: 1rem; }
    .search-bar { order: 3; min-width: 100%; margin-top: 0.5rem; }
    
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
}

/* Section Headers */
.section-header {
    border-bottom: none;
    align-items: center;
    background: var(--bg-surface);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin: 3rem 0 1.5rem;
}

.section-header h2 {
    font-size: 1.4rem;
    margin: 0;
}

.section-header a {
    background: var(--bg-body);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
}
.section-header a:hover {
    background: var(--primary-color);
    color: white;
}
