/* ============================================
   NpmShop - E-Commerce Brown Theme
   ============================================ */

/* --- CSS Variables / Theme --- */
:root {
    --brown-50:  #faf6f1;
    --brown-100: #f3ebe0;
    --brown-200: #e6d5c0;
    --brown-300: #d4b896;
    --brown-400: #bf9a6e;
    --brown-500: #a67c52;
    --brown-600: #8b5e3c;
    --brown-700: #6b3a2a;
    --brown-800: #4a2518;
    --brown-900: #2c140b;

    --accent:       #c44536;
    --accent-light: #e07a5f;
    --accent-dark:  #9b2c1e;
    --accent-green: #2d8a4e;
    --accent-gold:  #d4a017;

    --text-primary:   var(--brown-900);
    --text-secondary: var(--brown-600);
    --text-muted:     var(--brown-400);
    --text-on-dark:   #fff3e0;

    --bg-body:        var(--brown-50);
    --bg-card:        #ffffff;
    --bg-dark:        var(--brown-800);

    --border:         var(--brown-200);
    --shadow-sm:      0 1px 3px rgba(44, 20, 11, 0.08);
    --shadow-md:      0 4px 16px rgba(44, 20, 11, 0.10);
    --shadow-lg:      0 8px 32px rgba(44, 20, 11, 0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --font-sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-dark); }

ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ============================================
   BANKRUPTCY BANNER
   ============================================ */
.bankruptcy-banner {
    background: linear-gradient(135deg, #4a0000 0%, #7a1a1a 30%, #b22222 60%, #4a0000 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px 32px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.4);
    position: relative;
    z-index: 1001;
    animation: banner-pulse 3s ease-in-out infinite;
}

@keyframes banner-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(139, 0, 0, 0.4); }
    50%      { box-shadow: 0 4px 35px rgba(200, 0, 0, 0.7); }
}

.bankruptcy-banner .banner-icon {
    font-size: 48px;
    flex-shrink: 0;
    animation: shake 0.6s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-5deg); }
    75%      { transform: rotate(5deg); }
}

.banner-content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.banner-content p {
    font-size: 1.05rem;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto 8px;
    opacity: 0.95;
}

.banner-email {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #ffcc80;
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: background 0.3s, transform 0.2s;
}
.banner-email:hover { background: rgba(255,255,255,0.28); color: #fff; transform: scale(1.05); }

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background: var(--brown-800);
    color: var(--brown-300);
    font-size: 0.85rem;
    padding: 8px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.top-bar a { color: var(--brown-200); }
.top-bar a:hover { color: #fff; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 2px solid var(--brown-100);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--brown-800);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}
.logo:hover { color: var(--accent); }
.logo-icon { border-radius: var(--radius-sm); }

.main-nav ul { display: flex; gap: 4px; }

.main-nav a {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav a.active { background: var(--brown-100); color: var(--brown-800); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-search {
    display: flex;
    border: 2px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.header-search:focus-within { border-color: var(--brown-400); }

.hdr-search-input {
    border: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    outline: none;
    width: 180px;
    font-family: var(--font-sans);
}

.hdr-search-btn {
    background: var(--brown-100);
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.hdr-search-btn:hover { background: var(--brown-200); }

.cart-btn {
    position: relative;
    font-size: 1.5rem;
    color: var(--brown-700);
    transition: transform 0.2s;
}
.cart-btn:hover { transform: scale(1.1); color: var(--accent); }

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    background: linear-gradient(160deg, var(--brown-700) 0%, var(--brown-600) 40%, var(--brown-500) 100%);
    color: var(--text-on-dark);
    padding: 72px 0;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-tag {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    animation: pulse-tag 2s ease-in-out infinite;
}

@keyframes pulse-tag {
    0%, 100% { box-shadow: 0 0 0 0 rgba(196, 69, 54, 0.5); }
    50%      { box-shadow: 0 0 0 12px rgba(196, 69, 54, 0); }
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 32px;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 500px;
}

.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-image { display: flex; justify-content: center; align-items: center; }

.hero-img-placeholder {
    width: 280px;
    height: 280px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    border: 4px dashed rgba(255,255,255,0.25);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: #fff;
    color: #fff;
}

/* ============================================
   FEATURES BAR
   ============================================ */
.features-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}
.features-bar .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.feature-icon { font-size: 28px; }
.feature-item strong { display: block; font-size: 0.9rem; color: var(--brown-800); }
.feature-item span { font-size: 0.8rem; color: var(--text-muted); }

/* ============================================
   SECTIONS (shared)
   ============================================ */
.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    color: var(--brown-800);
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

section { padding: 80px 0; }

/* ============================================
   CATEGORIES
   ============================================ */
.categories { background: #fff; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--brown-50);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    transition: all 0.3s;
    color: var(--text-primary);
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brown-400);
    color: var(--text-primary);
}
.cat-icon { font-size: 44px; display: block; margin-bottom: 12px; }
.category-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--brown-800); margin-bottom: 4px; }
.category-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ============================================
   PRODUCTS
   ============================================ */
.products { background: var(--brown-50); }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 28px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}
.product-badge.sale { background: var(--accent); color: #fff; }
.product-badge.new  { background: var(--accent-green); color: #fff; }
.product-badge.hot  { background: var(--accent-gold); color: var(--brown-900); }

.product-img {
    background: var(--brown-100);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    position: relative;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-cat {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.product-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brown-800);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-rating {
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.product-rating span { color: var(--text-muted); font-size: 0.8rem; }

.product-price {
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.current-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
}
.old-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex: 1;
}

.btn-add-cart {
    width: 100%;
    padding: 12px;
    background: var(--brown-800);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    font-family: var(--font-sans);
    margin-top: auto;
}
.btn-add-cart:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   DEALS BANNER
   ============================================ */
.deals-banner {
    background: linear-gradient(160deg, var(--brown-800) 0%, var(--brown-700) 100%);
    color: var(--text-on-dark);
    padding: 64px 0;
}
.deals-banner .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.deals-tag {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--brown-900);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.deals-content h2 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.deals-content p {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 28px;
    line-height: 1.6;
}
.deals-content p strong { color: var(--accent-gold); }

.countdown {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.countdown-item {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    text-align: center;
    min-width: 70px;
}
.countdown-item span {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}
.countdown-item label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
}

.deals-image { display: flex; justify-content: center; }
.deals-img-placeholder {
    width: 240px;
    height: 240px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 90px;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials { background: #fff; }

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.testimonial-card {
    background: var(--brown-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform 0.25s, box-shadow 0.25s;
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.testimonial-stars { font-size: 1rem; margin-bottom: 12px; }

.testimonial-card > p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: var(--brown-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.testimonial-author strong { display: block; font-size: 0.9rem; color: var(--brown-800); }
.testimonial-author span { font-size: 0.8rem; color: var(--text-muted); }

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter {
    background: var(--brown-600);
    color: var(--text-on-dark);
    text-align: center;
    padding: 60px 24px;
}
.newsletter h2 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.newsletter p { font-size: 1.05rem; opacity: 0.9; margin-bottom: 28px; }

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.newsletter-form input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 1rem;
    outline: none;
    font-family: var(--font-sans);
}
.newsletter-form .btn {
    border-radius: 0;
    white-space: nowrap;
    padding: 16px 28px;
}

/* ============================================
   CONTACT
   ============================================ */
.contact { background: var(--brown-100); }

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-info { display: flex; flex-direction: column; gap: 24px; }

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-icon {
    font-size: 26px;
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.contact-item p { font-weight: 600; color: var(--brown-800); font-size: 0.95rem; }

.contact-form {
    background: #fff;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--brown-400); }

.contact-form .btn { align-self: flex-start; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--brown-800);
    color: var(--brown-200);
    padding: 60px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}
.footer-logo:hover { color: var(--brown-200); }

.footer-brand p { font-size: 0.9rem; opacity: 0.8; line-height: 1.6; }

.footer-links h4 {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.footer-links ul { display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
    color: var(--brown-300);
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .hero .container,
    .deals-banner .container {
        grid-template-columns: 1fr;
    }
    .hero-image, .deals-image { display: none; }
    .hero h1 { font-size: 2rem; }

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

@media (max-width: 768px) {
    .bankruptcy-banner { flex-direction: column; padding: 20px 16px; }
    .bankruptcy-banner .banner-icon { font-size: 36px; }
    .main-nav { display: none; }
    .header-search { display: none; }
    .countdown { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.6rem; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .footer-grid { grid-template-columns: 1fr; }
    .features-bar .container { flex-direction: column; align-items: center; text-align: center; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: 1fr; }
}
