/* ========================================
   PenguinFlip — Public Site Styles (Light)
   ======================================== */

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #0369a1;
    --accent: #f59e0b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text: #1e293b;
    --text-heading: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --white: #ffffff;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow { max-width: 800px; }

/* === Header === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}
.logo:hover { opacity: 0.85; }
.logo-img {
    height: 52px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    gap: 28px;
    align-items: center;
}
.main-nav a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.main-nav a:hover { color: var(--text-heading); }
.nav-login {
    background: var(--primary);
    color: #fff !important;
    padding: 7px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.88rem;
}
.nav-login:hover {
    background: var(--primary-dark);
    color: #fff !important;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

/* === Hero === */
.hero {
    padding: 70px 0 90px;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--text-heading);
}
.highlight { color: var(--primary); }
.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 24px 0 36px;
    max-width: 500px;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-logo-img {
    max-width: 420px;
    width: 100%;
    height: auto;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 12px 40px rgba(0,0,0,0.12));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* === Features === */
.features {
    padding: 80px 0;
    background: var(--bg-alt);
}
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 48px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 32px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}
.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 8px;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* === Products Section === */
.products-section {
    padding: 80px 0;
    background: var(--bg);
}
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: -36px;
    margin-bottom: 32px;
}
.product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 40px;
}
.filter-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.filter-count {
    font-size: 0.78rem;
    opacity: 0.7;
    margin-left: 2px;
}
.filter-btn.active .filter-count { opacity: 0.85; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: inherit;
}
.product-img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--bg-alt);
    overflow: hidden;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}
.product-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 3rem;
    color: var(--text-light);
    background: var(--bg-alt);
}
.product-condition {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.condition-new {
    background: #dcfce7;
    color: #15803d;
}
.condition-used {
    background: #fef3c7;
    color: #a16207;
}
.condition-reconditioned {
    background: #dbeafe;
    color: #1d4ed8;
}
.product-info {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-category {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}
.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.4;
    margin-bottom: 10px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-heading);
}
.product-price-old {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* === Product Detail Page === */
.product-detail {
    padding: 40px 0 80px;
}
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.product-gallery {
    position: sticky;
    top: 90px;
}
.gallery-main {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    margin-bottom: 12px;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}
.gallery-main .product-no-img {
    font-size: 5rem;
}
.gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.gallery-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
    background: var(--bg-alt);
}
.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--primary);
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-detail-info h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.3;
    margin-bottom: 8px;
}
.detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.detail-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.detail-category {
    font-size: 0.88rem;
    color: var(--text-muted);
}
.detail-price-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}
.detail-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-heading);
}
.detail-price-old {
    font-size: 1.2rem;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 10px;
}
.detail-price-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}
.detail-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--primary);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    margin-bottom: 28px;
}
.detail-contact-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(14,165,233,0.3);
}
.detail-description {
    margin-bottom: 28px;
}
.detail-description h3,
.detail-specs h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 10px;
}
.detail-description p {
    color: var(--text-muted);
    line-height: 1.8;
    white-space: pre-line;
}
.detail-specs-table {
    width: 100%;
    border-collapse: collapse;
}
.detail-specs-table tr {
    border-bottom: 1px solid var(--border-light);
}
.detail-specs-table td {
    padding: 10px 0;
    font-size: 0.92rem;
}
.detail-specs-table td:first-child {
    color: var(--text-muted);
    font-weight: 500;
    width: 140px;
}
.detail-specs-table td:last-child {
    color: var(--text);
    font-weight: 600;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.back-link:hover { color: var(--primary); }

.detail-barcode {
    margin-top: 20px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    display: inline-block;
}
.detail-barcode svg {
    display: block;
    max-width: 240px;
    height: auto;
}

/* === CTA === */
.cta-section { padding: 40px 0 80px; }
.cta-box {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: var(--radius);
    padding: 60px;
    text-align: center;
}
.cta-box h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}
.cta-box p {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    margin-bottom: 28px;
}
.cta-box .btn-primary {
    background: var(--white);
    color: var(--primary-dark);
}
.cta-box .btn-primary:hover {
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* === Footer === */
.site-footer {
    background: #0f172a;
    border-top: none;
    padding: 48px 0 32px;
    color: #cbd5e1;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer-logo-img {
    height: 60px;
    width: auto;
    display: block;
}
.footer-brand p {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 12px;
}
.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-links a {
    display: block;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.footer-links a:hover { color: #38bdf8; }

/* === Legal Pages === */
.legal-page {
    padding: 60px 0;
    min-height: 70vh;
}
.legal-page h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 8px;
}
.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 40px;
}
.legal-page h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 32px 0 12px;
}
.legal-page h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 20px 0 8px;
}
.legal-page p, .legal-page li {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}
.legal-page ul {
    padding-left: 24px;
    margin: 8px 0 16px;
}
.legal-page li { margin-bottom: 6px; }

/* === Responsive === */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero h1 { font-size: 2.5rem; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { display: none; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .cta-box { padding: 40px 24px; }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .product-gallery {
        position: static;
    }
    .product-detail-info h1 { font-size: 1.5rem; }
    .detail-price { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
    .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product-info { padding: 12px 12px 14px; }
    .product-title { font-size: 0.9rem; }
    .product-price { font-size: 1.05rem; }
}
