/* 
  Noble Source Global Design System
  Inspired by Telefonika & MaxBuy
*/

:root {
    /* Color Palette */
    --primary: #0047ba;
    /* Deep Tech Blue */
    --primary-dark: #00338a;
    --primary-light: #e6efff;
    --secondary: #ff6600;
    /* Vibrant Accent Orange for CTAs */
    --secondary-hover: #e65c00;

    --white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-alt: #f1f3f6;
    --border-color: #e0e0e0;

    --text-main: #333333;
    --text-muted: #757575;
    --text-light: #9e9e9e;

    /* Layout & Spacing */
    --container-width: 1280px;
    --header-height: 80px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 4rem 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Header & Nav (Telefonika Style) */
header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.top-bar {
    background: var(--primary);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
    flex-shrink: 0;
}

.search-container {
    flex-grow: 1;
    max-width: 600px;
    position: relative;
    display: flex;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 50px;
    border: 2px solid var(--bg-alt);
    border-radius: 50px;
    background: var(--bg-alt);
    font-family: inherit;
    transition: var(--transition);
}

.search-container input:focus {
    background: var(--white);
    border-color: var(--primary);
    outline: none;
}

.search-container button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.action-item i {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.action-item span {
    font-size: 0.75rem;
    font-weight: 600;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--secondary);
    color: var(--white);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* Category Nav */
.nav-bottom {
    border-top: 1px solid var(--bg-alt);
    background: var(--white);
}

.nav-links {
    display: flex;
    gap: 2rem;
    padding: 12px 0;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links a:hover {
    color: var(--primary);
}

.cat-menu-btn {
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    cursor: pointer;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary);
}

.footer-section p {
    color: #cbd5e0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #cbd5e0;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 12px;
    border-radius: var(--border-radius);
    border: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #cbd5e0;
}

/* Utility Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Product Cards (MaxBuy Style) */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--bg-alt);
}

.p-img-box {
    padding: 1.5rem;
    background: var(--bg-alt);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-img-box img {
    max-height: 100%;
    transition: var(--transition);
}

.product-card:hover .p-img-box img {
    transform: scale(1.08);
}

.p-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.p-cat {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.p-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.p-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: auto;
}

.p-action {
    margin-top: 1rem;
}

.p-action .btn {
    width: 100%;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-container {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .grid-4,
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Specific Page Header Utility */
.page-header {
    background: var(--primary-light);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 800;

    /* Valentine's Promo Section */
    .valentines-section {
        background: linear-gradient(135deg, #fff0f5 0%, #ffe6ea 100%);
        position: relative;
        overflow: hidden;
    }

    .val-card {
        background: white;
        border-radius: 12px;
        padding: 1.5rem;
        box-shadow: 0 4px 15px rgba(255, 77, 109, 0.15);
        border: 1px solid #ffccd5;
        transition: transform 0.3s ease;
        text-align: center;
    }

    .val-card:hover {
        transform: translateY(-5px);
    }

    .val-badge {
        background: #ff3366;
        color: white;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 800;
        display: inline-block;
        margin-bottom: 0.5rem;
    }

    /* Infinite Brand Slider */
    .brand-showcase {
        overflow: hidden;
        position: relative;
        background: white;
    }

    .brand-track {
        display: flex;
        width: calc(200px * 10);
        /* Adjust based on number of brands */
        animation: scroll 20s linear infinite;
    }

    .brand-slide {
        width: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 2rem;
    }

    .brand-slide img {
        height: 40px;
        filter: grayscale(1);
        opacity: 0.5;
        transition: all 0.3s ease;
    }

    .brand-slide img:hover {
        filter: grayscale(0);
        opacity: 1;
        transform: scale(1.1);
    }

    @keyframes scroll {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-200px * 5));
        }

        /* Scroll half the total width if duplicated */
    }

    /* Global Animations */
    .fade-in-up {
        animation: fadeInUp 0.8s ease-out forwards;
        opacity: 0;
        transform: translateY(20px);
    }

    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Store Locations */
    .store-map-card {
        background: white;
        padding: 2rem;
        border-radius: 12px;
        box-shadow: var(--shadow);
        border-left: 4px solid var(--primary);
        transition: var(--transition);
    }

    .store-map-card:hover {
        transform: translateY(-5px);
    }

    /* Mobile Optimizations */
    @media (max-width: 768px) {
        .brand-track {
            animation-duration: 10s;
        }

        .page-header h1 {
            font-size: 2rem;
        }

        .shop-layout {
            grid-template-columns: 1fr;
        }
    }