/* ===== DeepSais Phone Accessories - E-Commerce CSS ===== */
/* Clean, white-background, brand-accented design */

:root {
    --white: #ffffff;
    --bg: #f8f9fa;
    --bg-card: #ffffff;
    --bg-footer: #1a1a2e;
    --text: #1a1a2e;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --accent: #6366f1;
    --accent-2: #22d3ee;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.08);
    --green: #10b981;
    --green-bg: rgba(16, 185, 129, 0.08);
    --red: #ef4444;
    --orange: #f59e0b;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: 64px;
}

/* ===== Typography ===== */
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; margin-bottom: 1rem; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
p { margin-bottom: 0.75rem; color: var(--text-secondary); }
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

/* ===== Navigation ===== */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-width); margin: 0 auto;
    padding: 0 24px; height: 64px;
    display: flex; justify-content: space-between; align-items: center;
}
.nav-logo {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.15rem;
}
.nav-logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.nav-links { display: flex; gap: 24px; align-items: center; list-style: none; }
.nav-links a {
    color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
    transition: color 0.15s; padding: 4px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-cart { position: relative; cursor: pointer; display: flex; align-items: center; gap: 4px; font-size: 0.9rem; color: var(--text-secondary); }
.nav-cart:hover { color: var(--accent); }
.nav-cart .cart-count {
    background: var(--accent); color: white; font-size: 0.7rem; font-weight: 600;
    border-radius: 50%; width: 18px; height: 18px; display: flex;
    align-items: center; justify-content: center; position: absolute; top: -6px; right: -8px;
}

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.2s; border-radius: 2px; }

/* ===== Container ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: white; text-align: center; padding: 80px 24px;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
}
.hero h1 { font-size: 2.5rem; margin-bottom: 12px; position: relative; }
.hero p { color: rgba(255,255,255,0.9); font-size: 1.1rem; max-width: 500px; margin: 0 auto; position: relative; }

/* ===== Section ===== */
.section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 1.75rem; }
.section-header p { max-width: 500px; margin: 0 auto; }

/* ===== Product Grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.product-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
    transition: all 0.2s;
}
.product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    transform: translateY(-2px);
}
.product-card img {
    width: 100%; height: 220px; object-fit: cover;
    background: var(--bg); border-bottom: 1px solid var(--border-light);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.product-info { padding: 16px 20px 32px; }
.product-info h3 { margin-bottom: 4px; font-size: 1rem; }
.product-category { font-size: 0.8rem; color: var(--accent); font-weight: 500; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.product-price { font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.product-price .original { text-decoration: line-through; color: var(--text-light); font-size: 0.9rem; font-weight: 400; margin-left: 6px; }
.btn-buy {
    display: block; width: 100%; padding: 10px; text-align: center;
    background: var(--accent); color: white !important; border: none; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: background 0.15s; font-family: inherit;
}
.btn-buy:hover { background: var(--accent-hover); color: white !important; }

/* Fallback PayPal button for products that share a tier button */
.btn-paypal {
    background: #ffc439 !important;
    color: #003087 !important;
    border: 1px solid #e6a400;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.btn-paypal:hover { background: #f7b933 !important; color: #003087 !important; }

/* ===== PayPal Slot (inside product card) ===== */
.paypal-slot {
    margin: 12px -20px 0; padding: 14px 8px 70px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg); min-height: 300px;
    width: calc(100% + 40px); box-sizing: border-box;
    overflow: visible;
}
.paypal-slot iframe { min-height: 45px !important; }

.paypal-error {
    font-size: 0.75rem;
    color: #b91c1c;
    text-align: center;
    padding: 12px 0;
}

/* ===== PayPal Button Container ===== */
.paypal-btn-container { margin-top: 8px; min-height: 40px; }

/* ===== Feature Grid (homepage) ===== */
.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--bg-card); border-radius: var(--radius-lg); padding: 28px 24px;
    border: 1px solid var(--border-light); text-align: center; transition: box-shadow 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; }

/* ===== Category Pills ===== */
.category-list {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 32px;
}
.category-pill {
    padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border);
    background: var(--white); color: var(--text-secondary); font-size: 0.85rem;
    cursor: pointer; transition: all 0.15s; font-weight: 500;
}
.category-pill:hover, .category-pill.active {
    background: var(--accent); color: white; border-color: var(--accent);
}

/* ===== Content Page (About, Contact, Legal) ===== */
.content-page { max-width: 780px; margin: 0 auto; padding: 48px 24px 80px; }
.content-page h1 { margin-bottom: 24px; }
.content-page h2 { margin-top: 32px; margin-bottom: 12px; font-size: 1.25rem; }
.content-page p, .content-page li { color: var(--text-secondary); line-height: 1.8; }
.content-page ul, .content-page ol { margin: 12px 0 20px 24px; }
.content-page ul li, .content-page ol li { margin-bottom: 8px; }

/* Contact form */
.contact-form { margin-top: 32px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.95rem; font-family: inherit;
    transition: border-color 0.15s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit {
    padding: 12px 32px; background: var(--accent); color: white;
    border: none; border-radius: var(--radius); font-size: 0.95rem; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
}
.btn-submit:hover { background: var(--accent-hover); }

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 16px 0; font-size: 0.85rem; color: var(--text-light); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb span { color: var(--text); }

/* ===== Footer ===== */
footer {
    background: var(--bg-footer); color: #c4c4d4; padding: 48px 24px 24px;
}
.footer-grid {
    max-width: var(--max-width); margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px; margin-bottom: 32px;
}
.footer-brand-name { color: white; font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.footer-col h4 { color: white; font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; }
.footer-col a {
    display: block; color: #9ca3af; font-size: 0.85rem; margin-bottom: 8px;
    transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;
    text-align: center; font-size: 0.82rem;
}
.payment-icons { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }
.payment-icons span {
    background: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 4px;
    font-size: 0.75rem; font-weight: 500;
}

/* ===== Checkout Modal ===== */
.checkout-overlay {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center; justify-content: center;
    padding: 20px;
}
.checkout-overlay.active { display: flex; }
.checkout-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 440px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    position: relative;
}
.checkout-modal-close {
    position: absolute; top: 12px; right: 14px;
    background: none; border: none; cursor: pointer;
    font-size: 1.5rem; color: var(--text-light);
    line-height: 1; padding: 4px 8px; border-radius: var(--radius);
    transition: color 0.15s, background 0.15s;
    z-index: 1;
}
.checkout-modal-close:hover { color: var(--text); background: var(--bg); }
.checkout-modal-body { padding: 28px 24px 24px; }
.checkout-modal-body img {
    width: 100%; height: 200px; object-fit: cover;
    border-radius: var(--radius); margin-bottom: 16px;
    background: var(--bg);
}
.checkout-modal-body h3 {
    font-size: 1.15rem; margin-bottom: 6px;
}
.checkout-modal-body .modal-desc {
    font-size: 0.85rem; color: var(--text-secondary);
    margin-bottom: 12px; line-height: 1.5;
}
.checkout-modal-body .modal-price {
    font-size: 1.4rem; font-weight: 700; color: var(--text);
    margin-bottom: 20px; padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}
.checkout-modal-body .modal-price .original {
    text-decoration: line-through; color: var(--text-light);
    font-size: 0.95rem; font-weight: 400; margin-left: 6px;
}
.checkout-modal-body .modal-secure {
    font-size: 0.78rem; color: var(--text-light);
    text-align: center; margin-top: 12px;
}
#paypal-modal-container { min-height: 50px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .nav-links.open {
        display: flex; flex-direction: column; position: absolute;
        top: 64px; left: 0; right: 0; background: white; padding: 16px 24px;
        border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); gap: 12px;
    }
    .hero { padding: 48px 24px; }
    .hero h1 { font-size: 1.75rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
    .product-card img { height: 160px; }
    h1 { font-size: 1.5rem; }
    .content-page { padding: 32px 16px 48px; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; gap: 16px; }
    .product-info { padding: 12px 14px 16px; }
}
