/* ========================================
   CSS Variables - Professional Design
   ======================================== */
:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f7f7f7;
    --accent-yellow: #f5a623;
    --accent-yellow-light: #ffd93d;
    --accent-yellow-dark: #e59510;
    --accent-dark: #1a1a1a;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --card-bg: #ffffff;
    --border-color: #e5e5e5;
    --border-light: #f0f0f0;
    --success: #22c55e;
    --error: #ef4444;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s ease;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.15);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ========================================
   Static Pages (Support, About, Contact)
   ======================================== */
.page-section {
    padding: 120px 0 80px;
    min-height: 60vh;
}

/* ========================================
   Section Header
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-yellow);
    letter-spacing: 3px;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 3rem;
    letter-spacing: 4px;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.section-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    background: var(--accent-dark);
    color: var(--accent-yellow);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-yellow);
    color: var(--text-primary);
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.pulse {
    animation: pulse 0.4s ease;
}

/* ========================================
   Toast Notification
   ======================================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent-dark);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast::before {
    content: '✓ ';
    color: var(--accent-yellow);
    font-weight: 700;
}

/* ==========================================
   Image Click-to-Zoom
   ========================================== */

/* Zoom lens (hover magnifier) */
.product-page-main-image.zoom-active {
    cursor: none;
}

.zoom-lens {
    display: none;
    position: absolute;
    width: 200px;
    height: 200px;
    border: 3px solid var(--accent-yellow);
    border-radius: 50%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.15), 0 4px 20px rgba(0,0,0,0.35);
    transform: translate(-50%, -50%);
    transition: opacity 0.15s ease;
    will-change: left, top, background-position;
}

.zoom-lens.active {
    display: block;
}

/* Zoomed image inside container */
.product-page-main-image.zoom-active img {
    transform: scale(2.5);
    transition: none;
}

/* ==========================================
   Click to Zoom - Image zoomed state
   ========================================== */

.product-page-body {
    position: relative;
}

/* Zoomed image: fixed to viewport center, scaled up */
#productPageImage.zoomed {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(1.8) !important;
    z-index: 10001;
    max-width: 90vw !important;
    max-height: 90vh !important;
    object-fit: contain;
    cursor: zoom-out;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    transition: transform 0.3s ease !important;
}

/* Dark overlay - covers entire viewport */
.zoom-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    cursor: zoom-out;
    justify-content: center;
    align-items: center;
}

.zoom-overlay.active {
    display: flex !important;
}

/* Close button - top right of viewport */
.zoom-close-btn {
    display: none;
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10002;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.zoom-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.zoom-close-btn svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
}

.zoom-close-btn.active {
    display: flex !important;
}

/* Zoom overlay nav buttons (prev/next) */
.zoom-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10002;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(4px);
}

.zoom-nav-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
}

.zoom-nav-btn svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
}

.zoom-prev {
    left: 24px;
}

.zoom-next {
    right: 24px;
}

/* Zoom overlay fade-in */
.zoom-overlay {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.zoom-overlay[style*="display: flex"] {
    opacity: 1;
}

.zoom-overlay img {
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(0.85);
    max-width: 88vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    user-select: none;
    -webkit-user-drag: none;
}

.zoom-overlay[style*="display: flex"] img {
    opacity: 1;
    transform: scale(1);
}

/* Image transition inside lightbox when switching */
.zoom-overlay img.switching {
    opacity: 0;
    transform: scale(0.9) translateY(16px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* ========================================
   Responsive - Base / Shared
   ======================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .section-title {
        font-size: 2rem;
    }
}
