/* ========================================
   IgoBuy Enhanced Styles
   Main Color: #FFCE1B
   ======================================== */

:root {
    --primary: #FFCE1B;
    --primary-dark: #E5B700;
    --primary-light: #FFD84D;
    --navy: #0b2f6b; /* deep navy blue */
    --dark: #1a1a2e;
    --dark-alt: #16213e;
    --light: #f8f9fa;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --success: #27ae60;
    --error: #e74c3c;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, #FFCE1B 0%, #FFA500 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.site-header {
    background: var(--white);
    box-shadow: 0 2px 20px var(--shadow);
    position: relative;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 20px;
    gap: 0.6rem;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    background: none;
    -webkit-text-fill-color: inherit;
    background-clip: border-box;
    letter-spacing: -0.5px;
    text-shadow: none;
    animation: none;
}

/* Image logo for headers */
.logo-img {
    height: 60px;
    max-height: 60px;
    width: auto;
    display: block;
}

@media (max-width: 640px) {
  .logo-img { height: 48px; max-height: 48px; }
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(255, 206, 27, 0.3)); }
    50% { filter: drop-shadow(0 0 15px rgba(255, 206, 27, 0.6)); }
}

.tag {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.nav {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: all 0.25s ease;
    position: relative;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.nav a::after { display: none; }

.nav a:hover {
    color: #ffffff;
    background: #111827;
    border-color: #111827;
    transform: translateY(-1px);
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .header-inner { flex-wrap: nowrap; }
  .nav { gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
  .nav a { padding: 0.45rem 0.7rem; }
}

/* Mobile Nav Toggle */
/* Menu button hidden across pages */
.menu-btn { display: none !important; }

@media (max-width: 768px) {
  /* Keep nav visible on mobile; no toggle required */
  .nav { display: flex; }
}

/* Theme toggle button styles removed */

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    position: relative;
    background: var(--gradient-dark);
    color: var(--white);
    padding: 6rem 0 8rem;
    overflow: hidden;
    margin-bottom: 4rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 206, 27, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 165, 0, 0.1) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(255, 206, 27, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 206, 27, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero h1::after {
    content: '✨';
    margin-left: 1rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

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

/* ========================================
   SEARCH BAR
   ======================================== */

.search-bar {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    max-width: 900px;
    background: var(--white);
    padding: 0.75rem;
    border-radius: 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
    transition: all 0.3s ease;
}

.search-bar:hover {
    box-shadow: 0 15px 50px rgba(255, 206, 27, 0.4);
    transform: translateY(-5px);
}

.search-bar input,
.search-bar select {
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    background: transparent;
    color: var(--text);
    outline: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.search-bar input:focus,
.search-bar select:focus {
    background: rgba(255, 206, 27, 0.05);
}

.search-bar input::placeholder {
    color: var(--text-light);
}

.search-bar button {
    background: var(--gradient-primary);
    color: var(--dark);
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 206, 27, 0.4);
}

.search-bar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 206, 27, 0.6);
}

.search-bar button:active {
    transform: translateY(0);
}

/* ========================================
   CATEGORIES
   ======================================== */

.categories {
    padding: 4rem 0;
    background: var(--white);
    position: relative;
}

.categories::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 206, 27, 0.05), transparent);
}

.categories h2,
.featured h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text);
    font-weight: 800;
    position: relative;
    display: inline-block;
    width: 100%;
}

.categories h2::after,
.featured h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.category-card {
    background: var(--white);
    padding: 2rem 1rem;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px var(--shadow);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.category-card:hover::before {
    opacity: 0.1;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 206, 27, 0.3);
    border-color: var(--primary);
}

.category-card:nth-child(even):hover {
    transform: translateY(-10px) scale(1.05) rotate(2deg);
}

.category-card:nth-child(odd):hover {
    transform: translateY(-10px) scale(1.05) rotate(-2deg);
}

/* ========================================
   FEATURED ITEMS
   ======================================== */

.featured {
    padding: 4rem 0;
    background: linear-gradient(to bottom, var(--white), var(--light));
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.item-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.item-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid var(--primary);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.item-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px var(--shadow-lg);
}

.item-card:hover::after {
    opacity: 1;
}

.item-img {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.item-img.placeholder {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
}

.item-img.placeholder::before {
    content: '📦';
    animation: float 3s ease-in-out infinite;
}

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

.item-info {
    padding: 1.5rem;
}

.item-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.item-info p {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
}

/* ========================================
   FORMS
   ======================================== */

.form-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    max-width: 600px;
    margin: 3rem auto;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.form-card h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-weight: 800;
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--light);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 206, 27, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--dark);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 206, 27, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 206, 27, 0.5);
}

.btn:active {
    transform: translateY(-1px);
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
    border: 2px solid var(--success);
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error);
    border: 2px solid var(--error);
}

.note {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 1rem 0;
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    background: var(--dark-alt);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.site-footer p {
    font-weight: 500;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .search-bar {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }
    
    .search-bar button {
        padding: 1rem;
    }
    
    .header-inner {
        flex-wrap: wrap;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .form-card {
        padding: 2rem 1.5rem;
        margin: 2rem 1rem;
    }
}
