/* Shop Smartly Now - Custom Styles */

/* CSS Variables for Color Palette */
:root {
    --primary-color: #4F46E5;     /* Indigo 600 */
    --secondary-color: #14B8A6;   /* Teal 500 */
    --accent-color: #F59E0B;      /* Amber 500 */
    --bg-color: #F8FAFC;          /* Slate 50 */
    --text-color: #0F172A;        /* Slate 900 */
    --white: #FFFFFF;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: #6c757d;
}

/* Custom Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 12px 24px;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #3730A3);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3730A3, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--white);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #0F766E);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #0F766E, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--white);
}

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

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

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

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Navigation Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    padding: 1rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-color), #3730A3);
    color: var(--white);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx=".5" cy=".5" r=".5"><stop offset="0%" stop-color="%23ffffff" stop-opacity=".1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    margin-top: 2rem;
}

.hero-image img {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 3rem;
}

/* Deal Cards */
.deal-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.deal-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.deal-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.deal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.deal-card:hover .deal-image img {
    transform: scale(1.1);
}

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.deal-content {
    padding: 1.5rem;
}

.deal-content h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.price-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1rem 0;
}

.original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
}

.sale-price {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.25rem;
}

/* Insight Cards */
.insight-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(30, 144, 255, 0.1);
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.insight-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.insight-icon i {
    font-size: 2rem;
    color: var(--white);
}

.insight-card:hover .insight-icon {
    transform: scale(1.1) rotate(5deg);
}

.insight-card h5 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Category Cards */
.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.category-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-content {
    padding: 1.5rem;
    text-align: center;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -30px auto 1rem;
    position: relative;
    z-index: 2;
}

.category-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

/* Brands Carousel */
.brands-carousel {
    overflow: hidden;
    position: relative;
}

.brands-track {
    display: flex;
    animation: scroll 20s linear infinite;
    gap: 3rem;
}

.brand-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.brand-logo {
    height: 60px;
    width: auto;
    filter: grayscale(100%) opacity(0.7);
    transition: var(--transition);
}

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

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

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--text-color), #1F2937);
    color: var(--white);
}

.newsletter-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.newsletter-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto 1rem;
}

.newsletter-form .form-control {
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    padding: 15px 20px;
    font-size: 1rem;
}

.newsletter-form .btn {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 15px 25px;
}

.newsletter-disclaimer {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: var(--white);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-links {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.footer-copyright,
.footer-location {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

/* Modal Styles */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-hover);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

.coupon-code {
    background: linear-gradient(135deg, var(--bg-color), #e9ecef);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.coupon-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .newsletter-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .brands-track {
        gap: 2rem;
    }
    
    .brand-logo {
        height: 40px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .newsletter-form .input-group {
        flex-direction: column;
    }
    
    .newsletter-form .form-control,
    .newsletter-form .btn {
        border-radius: var(--border-radius);
        margin-bottom: 1rem;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Performance Optimizations */
.will-change {
    will-change: transform;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .brands-track {
        animation: none;
    }
    
    .hero-image img {
        animation: none;
    }
}
/* Category Hero */
.category-hero {
  position: relative;
  min-height: 50vh;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 72px; /* ensure content not hidden under fixed navbar */
}
.category-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.15), rgba(255,255,255,0));
}
.category-hero .hero-content {
  position: relative;
  z-index: 1;
}

/* Coupon Cards */
.coupon-card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  height: 100%;
  position: relative;
  transition: var(--transition);
}
.coupon-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.coupon-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--accent-color);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.coupon-title { font-size: 1rem; font-weight: 600; margin-top: 1.75rem; }
.coupon-desc { font-size: .9rem; color: #6c757d; margin-bottom: .75rem; }
.coupon-meta { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: #6c757d; margin-bottom: .75rem; }
.store-badge { display: inline-flex; align-items: center; gap: .25rem; background: #f1f5f9; padding: 4px 8px; border-radius: 999px; font-weight: 600; color: #334155; }
.expires { display: inline-flex; align-items: center; gap: .25rem; }

/* Fix overlap for fixed-top navbar on pages without a tall hero */
body { padding-top: 74px; }
@media (min-width: 992px){ body { padding-top: 82px; } }
