/* ============================================
   TechStyle Corp — Main Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
    --primary:   #0f172a;
    --accent:    #2563eb;
    --accent-h:  #1d4ed8;
    --success:   #16a34a;
    --bg:        #f1f5f9;
    --surface:   #ffffff;
    --text:      #334155;
    --muted:     #64748b;
    --border:    #e2e8f0;
    --header-h:  64px;
    --radius:    10px;
    --shadow:    0 4px 24px rgba(15,23,42,0.08);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; font-size: 15px; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }

/* ============================================
   TOP BAR (announcement)
   ============================================ */
.top-bar {
    background: var(--primary);
    color: #94a3b8;
    text-align: center;
    padding: 7px 5%;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}
.top-bar span { color: #fff; font-weight: 500; }

/* ============================================
   HEADER / NAV
   ============================================ */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(15,23,42,0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 5%;
    height: var(--header-h);
    max-width: 1280px;
    margin: auto;
}

/* Logo */
.logo a {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.logo a span { color: var(--accent); }

/* Nav links */
.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}
.nav-links a {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: background 0.15s, color 0.15s;
}
.nav-links a:hover, .nav-links a.active { background: var(--bg); color: var(--accent); }

/* Search bar */
.search-bar {
    display: flex;
    flex-grow: 1;
    max-width: 380px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input {
    flex-grow: 1;
    padding: 8px 14px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    background: transparent;
    color: var(--primary);
}
.search-bar button {
    padding: 8px 16px;
    background: var(--accent);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}
.search-bar button:hover { background: var(--accent-h); }

/* Cart button */
.cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
}
.cart-btn:hover { background: #1e293b; transform: translateY(-1px); }
.cart-btn svg { flex-shrink: 0; }
.cart-count {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ============================================
   HERO BANNER
   ============================================ */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #2563eb 100%);
    color: white;
    padding: 5rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(37,99,235,0.4) 0%, transparent 65%);
}
.hero-inner { position: relative; max-width: 640px; margin: auto; }
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    color: #93c5fd;
}
.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}
.hero p { font-size: 1.05rem; color: #94a3b8; margin-bottom: 2rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
    background: white;
    color: var(--primary);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.15s, box-shadow 0.15s;
    display: inline-block;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.btn-ghost {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255,255,255,0.35);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.15s, border-color 0.15s;
    display: inline-block;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }

/* ============================================
   CATEGORY PILLS
   ============================================ */
.categories-row {
    padding: 2rem 5%;
    max-width: 1280px;
    margin: auto;
}
.categories-row h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}
.category-pills {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.category-pill {
    padding: 8px 20px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
}
.category-pill:hover, .category-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

/* ============================================
   SECTION / LAYOUT
   ============================================ */
.section {
    padding: 2.5rem 5%;
    max-width: 1280px;
    margin: auto;
}
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.section-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}
.section-link { font-size: 0.9rem; color: var(--accent); font-weight: 600; }
.section-link:hover { text-decoration: underline; }

/* ============================================
   PRODUCT GRID & CARDS
   ============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    color: inherit;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.product-image-wrap {
    position: relative;
    overflow: hidden;
    background: #f8fafc;
}
.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.product-card:hover .product-image { transform: scale(1.05); }

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.product-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.3rem;
}
.product-brand {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.product-title {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}
.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: 0.3rem;
}
.product-cta {
    margin-top: auto;
    padding-top: 1rem;
    background: var(--bg);
    color: var(--primary);
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    display: block;
    margin-top: 1rem;
}
.product-card:hover .product-cta {
    background: var(--accent);
    color: white;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    padding: 1rem 5%;
    max-width: 1280px;
    margin: auto;
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.breadcrumb a { color: var(--muted); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--primary); font-weight: 500; }

/* ============================================
   PDP (Product Detail Page)
   ============================================ */
.pdp-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 2.5rem;
}
.pdp-image { width: 100%; border-radius: 8px; object-fit: cover; max-height: 480px; }
.pdp-info { display: flex; flex-direction: column; gap: 1rem; }
.pdp-category { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.pdp-name { font-family: 'Syne', sans-serif; font-size: 1.9rem; font-weight: 800; color: var(--primary); line-height: 1.15; }
.pdp-price { font-size: 2rem; font-weight: 700; color: var(--accent); }
.pdp-divider { border: none; border-top: 1px solid var(--border); }
.pdp-desc { color: var(--text); line-height: 1.75; font-size: 0.97rem; }
.pdp-atc-btn {
    background: var(--accent);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s, transform 0.15s;
    margin-top: 0.5rem;
}
.pdp-atc-btn:hover { background: var(--accent-h); transform: translateY(-2px); }

/* ============================================
   CART PAGE
   ============================================ */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}
.cart-items { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-name { font-weight: 600; color: var(--primary); }
.cart-item-meta { font-size: 0.85rem; color: var(--muted); }
.cart-item-price { font-weight: 700; color: var(--accent); margin-left: auto; white-space: nowrap; }
.cart-summary {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: sticky;
    top: calc(var(--header-h) + 1rem);
}
.cart-summary h3 { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 0.75rem; font-size: 0.95rem; }
.summary-row.total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.25rem; }
.checkout-btn {
    display: block;
    width: 100%;
    background: var(--success);
    color: white;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 1.5rem;
    transition: background 0.2s, transform 0.15s;
}
.checkout-btn:hover { background: #15803d; transform: translateY(-2px); }
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
}
.empty-state svg { margin: 0 auto 1rem; opacity: 0.3; }
.empty-state h2 { font-family: 'Syne', sans-serif; font-size: 1.4rem; color: var(--primary); margin-bottom: 0.5rem; }
.continue-btn {
    display: inline-block;
    margin-top: 1.5rem;
    background: var(--accent);
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
}

/* ============================================
   CHECKOUT
   ============================================ */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}
.checkout-form-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
}
.checkout-form-card h2 { font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--primary); margin-bottom: 5px; }
.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
}
.form-group input:focus { border-color: var(--accent); }
.pay-btn {
    width: 100%;
    background: var(--success);
    color: white;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.5rem;
    transition: background 0.2s;
}
.pay-btn:hover { background: #15803d; }

/* Order success */
.success-card {
    text-align: center;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 4rem 2rem;
    max-width: 520px;
    margin: 3rem auto;
}
.success-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.success-card h1 { font-family: 'Syne', sans-serif; color: var(--success); font-size: 2rem; margin-bottom: 0.5rem; }
.success-card p { color: var(--muted); margin-bottom: 0.3rem; }
.order-id { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-top: 0.5rem; }

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--primary);
    color: #94a3b8;
    margin-top: 4rem;
}
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding: 3rem 5%;
    max-width: 1280px;
    margin: auto;
}
.footer-brand .logo-text {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
}
.footer-brand .logo-text span { color: var(--accent); }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 260px; }
.footer-col h4 { color: white; font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: 0.04em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { font-size: 0.88rem; transition: color 0.15s; }
.footer-col a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    padding: 1.2rem 5%;
    font-size: 0.8rem;
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-header { padding: 2rem 5% 0; max-width: 1280px; margin: auto; }
.search-header h1 { font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 800; }
.search-header p { color: var(--muted); margin-top: 0.3rem; }

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .pdp-layout { grid-template-columns: 1fr; }
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; gap: 2rem; }
    .hero { padding: 3rem 5%; }
    .hero-btns { flex-direction: column; align-items: center; }
    .cart-summary { position: static; }
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    padding: 4rem 5%;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.newsletter-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.07) 0%, transparent 60%);
    pointer-events: none;
}
.newsletter-inner { position: relative; max-width: 520px; margin: auto; }
.newsletter-tag {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 4px 14px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: #bfdbfe;
}
.newsletter-section h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}
.newsletter-section p { color: #93c5fd; font-size: 0.95rem; margin-bottom: 1.75rem; }
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 420px;
    margin: 0 auto 0.75rem;
}
.newsletter-form input {
    flex: 1;
    padding: 11px 16px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}
.newsletter-form button {
    padding: 11px 22px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s;
}
.newsletter-form button:hover { background: #1e293b; }
.newsletter-note { font-size: 0.78rem; color: #93c5fd; opacity: 0.8; }

/* ============================================
   LEAD / CONTACT FORM PAGE
   ============================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 2.5rem;
    align-items: start;
}
.contact-info-card {
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    padding: 2.5rem;
}
.contact-info-card h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}
.contact-info-card p { color: #94a3b8; font-size: 0.95rem; line-height: 1.75; margin-bottom: 2rem; }
.contact-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}
.contact-detail-icon {
    width: 36px;
    height: 36px;
    background: rgba(37,99,235,0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-detail-text strong { display: block; color: white; font-size: 0.85rem; }
.contact-detail-text span { color: #94a3b8; font-size: 0.82rem; }

.contact-form-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}
.contact-form-card h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    color: var(--primary);
}
.contact-form-card .subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.75rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-family: inherit;
    font-size: 0.95rem;
    background: white;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.form-group select:focus { border-color: var(--accent); }
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 120px;
    outline: none;
    transition: border-color 0.2s;
    color: var(--text);
}
.form-group textarea:focus { border-color: var(--accent); }
.submit-btn {
    width: 100%;
    background: var(--accent);
    color: white;
    padding: 13px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s;
    margin-top: 0.5rem;
}
.submit-btn:hover { background: var(--accent-h); transform: translateY(-1px); }

.form-success {
    text-align: center;
    padding: 2rem;
    display: none;
}
.form-success .success-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.form-success h3 { font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 800; color: var(--success); }
.form-success p { color: var(--muted); font-size: 0.9rem; margin-top: 0.3rem; }

@media (max-width: 768px) {
    .contact-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .newsletter-form { flex-direction: column; }
}
