/* HexLitho Pro v2.3.2 — Designer CSS */
:root {
    --hex-bg: #0a0a1a;
    --hex-surface: rgba(255,255,255,0.05);
    --hex-surface-hover: rgba(255,255,255,0.10);
    --hex-border: rgba(255,255,255,0.10);
    --hex-accent: #10b981;
    --hex-accent-glow: rgba(16,185,129,0.3);
    --hex-purple: #8b5cf6;
    --hex-blue: #3b82f6;
    --hex-text: #f1f5f9;
    --hex-muted: rgba(255,255,255,0.6);
    --hex-radius: 16px;
}

.hexlitho-designer {
    max-width: 1200px; margin: 0 auto; padding: 0;
    background: var(--hex-bg); color: var(--hex-text);
    font-family: 'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    line-height: 1.6; border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5); overflow: hidden;
}

/* ══ HERO ══ */
.hexlitho-hero {
    position: relative; text-align: center; padding: 70px 40px 50px;
    background: linear-gradient(135deg, #0f0c29, #302b63 50%, #24243e);
    overflow: hidden;
}
.hexlitho-hero::before {
    content:''; position:absolute; top:-50%; left:-50%; width:200%; height:200%;
    background: radial-gradient(circle at 30% 50%, rgba(139,92,246,0.15), transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(16,185,129,0.10), transparent 50%);
    animation: hexGlow 8s ease-in-out infinite alternate;
}
@keyframes hexGlow { 0%{transform:translate(0,0)} 100%{transform:translate(-5%,3%)} }
.hexlitho-hero-content { position: relative; z-index: 1; }
.hexlitho-hero h2 {
    font-size: clamp(32px,5vw,52px); font-weight: 800; margin: 0 0 10px;
    background: linear-gradient(135deg,#fff,#c7d2fe 50%,#10b981);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.hexlitho-tagline { font-size: clamp(15px,2.5vw,19px); color: var(--hex-muted); margin: 0 0 35px; }
.hexlitho-steps { display:flex; justify-content:center; gap:36px; flex-wrap:wrap; margin-bottom:10px; }
.hexlitho-step { display:flex; flex-direction:column; align-items:center; gap:6px; }
.hexlitho-step-num {
    width:38px; height:38px; border-radius:50%;
    background:linear-gradient(135deg,var(--hex-accent),var(--hex-blue));
    color:#fff; font-weight:700; font-size:15px;
    display:flex; align-items:center; justify-content:center;
}
.hexlitho-step-label { font-size:12px; color:var(--hex-muted); font-weight:500; }

/* ══ UPLOAD ══ */
.hexlitho-upload-area {
    text-align:center; padding:50px 30px; margin:0 40px 24px;
    background:var(--hex-surface); border-radius:var(--hex-radius);
    border:2px dashed var(--hex-border); transition:all 0.3s; cursor:pointer;
}
.hexlitho-upload-area:hover, .hexlitho-upload-area.hex-dragover {
    background:var(--hex-surface-hover); border-color:var(--hex-accent);
    box-shadow:0 0 30px var(--hex-accent-glow);
}
.hexlitho-upload-area.hex-dragover { transform:scale(1.01); }
.hexlitho-upload-icon { font-size:44px; margin-bottom:14px; opacity:0.8; }
.hexlitho-upload-btn {
    display:inline-block; padding:15px 44px;
    background:linear-gradient(135deg,var(--hex-accent),#059669);
    color:#fff; font-size:15px; font-weight:700; border-radius:12px;
    cursor:pointer; transition:all 0.3s; border:none; text-transform:uppercase;
}
.hexlitho-upload-btn:hover { transform:translateY(-2px); box-shadow:0 8px 25px var(--hex-accent-glow); }
.hexlitho-upload-hint { margin-top:10px; font-size:12px; color:var(--hex-muted); }

/* ══ PROGRESS BAR ══ */
.hexlitho-progress-wrap { margin:0 40px 24px; display:none; }
.hexlitho-progress-wrap.active { display:block; animation:hexFadeIn 0.3s ease; }
.hexlitho-progress-outer { height:5px; background:rgba(255,255,255,0.1); border-radius:3px; overflow:hidden; margin-bottom:6px; }
.hexlitho-progress-inner { height:100%; background:linear-gradient(90deg,var(--hex-accent),var(--hex-blue)); border-radius:3px; width:0%; transition:width 0.3s; }
.hexlitho-progress-text { font-size:12px; color:var(--hex-muted); text-align:center; }

/* ══ CONTENT AREAS ══ */
.hexlitho-preview { margin:0 40px 20px; border-radius:var(--hex-radius); overflow:hidden; }
.hexlitho-controls { padding:0 40px 20px; text-align:center; }
.hexlitho-result { padding:0 40px 40px; }
#hexlitho-status { text-align:center; padding:12px; font-size:13px; color:var(--hex-muted); }

/* ══ BUTTONS ══ */
.hexlitho-btn-primary {
    display:inline-block; padding:15px 44px;
    background:linear-gradient(135deg,var(--hex-purple),var(--hex-blue));
    color:#fff; font-size:15px; font-weight:700; border:none; border-radius:12px;
    cursor:pointer; transition:all 0.3s; text-transform:uppercase;
}
.hexlitho-btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 25px rgba(139,92,246,0.4); }

/* ══ PRICE PANEL (A4) ══ */
.hexlitho-price-panel {
    background:linear-gradient(135deg,rgba(16,185,129,0.12),rgba(59,130,246,0.08));
    border:1px solid rgba(16,185,129,0.25); border-radius:var(--hex-radius); padding:20px; margin-top:16px;
}
.hexlitho-price-row { display:flex; justify-content:space-between; padding:6px 0; font-size:14px; color:var(--hex-muted); }
.hexlitho-price-row.total { border-top:1px solid rgba(255,255,255,0.12); padding-top:14px; margin-top:6px; font-size:20px; font-weight:800; color:var(--hex-accent); }
.hexlitho-price-savings { display:inline-block; background:rgba(16,185,129,0.2); color:var(--hex-accent); padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; }

/* ══ ADD TO CART ══ */
.hexlitho-add-cart-btn {
    display:block; width:100%; padding:16px; margin-top:16px;
    background:linear-gradient(135deg,var(--hex-accent),#059669);
    color:#fff; font-size:17px; font-weight:800; border:none; border-radius:14px;
    cursor:pointer; transition:all 0.3s; text-transform:uppercase; letter-spacing:0.04em;
}
.hexlitho-add-cart-btn:hover { transform:translateY(-2px); box-shadow:0 12px 35px var(--hex-accent-glow); }
.hexlitho-add-cart-btn:disabled { opacity:0.5; cursor:not-allowed; transform:none; }

/* ══ 3D VIEWER ══ */
#v3d { border-radius:var(--hex-radius) !important; }

/* ══ RESPONSIVE ══ */
@media (max-width:768px) {
    .hexlitho-hero { padding:40px 16px 30px; }
    .hexlitho-hero h2 { font-size:28px !important; }
    .hexlitho-tagline { font-size:14px !important; }
    .hexlitho-steps { gap:12px; }
    .hexlitho-step-num { width:30px; height:30px; font-size:13px; }
    .hexlitho-step-label { font-size:10px; }
    .hexlitho-upload-area,.hexlitho-preview,.hexlitho-controls,.hexlitho-result,.hexlitho-progress-wrap { margin-left:12px; margin-right:12px; }
    .hexlitho-upload-area { padding:30px 16px; }
    .hexlitho-upload-btn,.hexlitho-btn-primary { padding:12px 28px; font-size:13px; width:100%; box-sizing:border-box; }
    .hexlitho-price-panel { padding:14px; }
    #v3d { height:400px !important; }
    .hexlitho-add-cart-btn { font-size:15px; padding:14px; }
    #hex3d-controls button { width:36px !important; height:36px !important; font-size:16px !important; }
}
@media (max-width:480px) {
    .hexlitho-designer { border-radius:0; }
    .hexlitho-hero { padding:30px 12px 24px; }
    .hexlitho-upload-area,.hexlitho-preview,.hexlitho-controls,.hexlitho-result,.hexlitho-progress-wrap { margin-left:8px; margin-right:8px; }
    #v3d { height:320px !important; }
    .hexlitho-price-row { font-size:13px; }
    .hexlitho-price-row.total { font-size:17px; }
}
@media (max-width:900px) {
    .hexlitho-step2-grid { grid-template-columns:1fr !important; }
}

/* ══ GALLERY ══ */
.hexlitho-gallery { padding:40px; background:linear-gradient(135deg,rgba(16,185,129,0.05),rgba(59,130,246,0.05)); border-top:1px solid rgba(255,255,255,0.06); }
.hexlitho-gallery h3 { text-align:center; font-size:22px; font-weight:700; margin:0 0 8px; color:var(--hex-text); }
.hexlitho-gallery-subtitle { text-align:center; font-size:14px; color:var(--hex-muted); margin:0 0 24px; }
.hexlitho-gallery-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; }
.hexlitho-gallery-card { background:var(--hex-surface); border-radius:14px; overflow:hidden; border:1px solid var(--hex-border); transition:all 0.3s; }
.hexlitho-gallery-card:hover { transform:translateY(-4px); box-shadow:0 12px 30px rgba(0,0,0,0.3); border-color:var(--hex-accent); }
.hexlitho-gallery-img { width:100%; aspect-ratio:1; }
.hexlitho-gallery-info { padding:12px; }
.hexlitho-gallery-info strong { font-size:14px; }
.hexlitho-gallery-info span { font-size:12px; color:var(--hex-muted); display:block; margin-top:4px; }
.hexlitho-gallery-stars { color:#fbbf24; font-size:12px; margin-top:4px; }
@media (max-width:768px) { .hexlitho-gallery { padding:24px 12px; } .hexlitho-gallery-grid { grid-template-columns:repeat(2,1fr); gap:10px; } }

/* ══ ANIMATIONS ══ */
@keyframes hexFadeIn { from{opacity:0;transform:translateY(15px)} to{opacity:1;transform:translateY(0)} }
@keyframes hexPulse { 0%,100%{box-shadow:0 0 0 0 var(--hex-accent-glow)} 50%{box-shadow:0 0 20px 5px var(--hex-accent-glow)} }
.hex-fade-in { animation:hexFadeIn 0.4s ease forwards; }
.hex-pulse { animation:hexPulse 2s ease-in-out infinite; }

/* ═══ Language Switcher ═══ */
.hexlitho-lang-bar {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 8px 0;
}
.hexlitho-lang-btn {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.hexlitho-lang-btn:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.hexlitho-lang-btn.active {
    background: var(--hex-primary, #10b981);
    border-color: var(--hex-primary, #10b981);
    color: #000;
}

/* RTL support */
[dir="rtl"] .hexlitho-lang-bar { justify-content: flex-start; }
[dir="rtl"] .hexlitho-steps { direction: rtl; }

/* ══ LOADING SKELETON ══ */
@keyframes hexShimmer { 0%{background-position:-200px 0} 100%{background-position:200px 0} }
.hex-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 400px 100%;
    animation: hexShimmer 1.5s ease-in-out infinite;
    border-radius: 12px;
}

/* ══ ACCESSIBILITY ══ */
.hexlitho-designer *:focus-visible {
    outline: 2px solid var(--hex-accent);
    outline-offset: 2px;
}
.hexlitho-upload-area:focus-within {
    border-color: var(--hex-accent);
    box-shadow: 0 0 0 3px var(--hex-accent-glow);
}

/* ══ PRINT STYLES ══ */
@media print {
    .hexlitho-designer { box-shadow:none; }
    .hexlitho-hero, .hexlitho-gallery, #hex3d-controls { display:none !important; }
}

/* ══ GALLERY LITHO PREVIEWS ══ */
.hex-gallery-litho {
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.hex-gallery-litho::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, rgba(251,191,36,0.15) 0%, transparent 70%);
    animation: hexGalleryGlow 3s ease-in-out infinite alternate;
}
@keyframes hexGalleryGlow {
    0% { opacity: 0.3; } 100% { opacity: 0.8; }
}
.hexlitho-gallery-stars { color: #fbbf24; letter-spacing: 2px; }

/* ══ LAZY LOADING ══ */
.hex-lazy { opacity: 0; transform: translateY(20px); transition: opacity 0.5s, transform 0.5s; }
.hex-lazy.hex-visible { opacity: 1; transform: translateY(0); }

/* ══ MOBILE DESIGNER LAYOUT ══ */
@media (max-width:768px) {
    .hexlitho-step2-grid { grid-template-columns: 1fr !important; }
    .hexlitho-designer canvas { height: 350px !important; }
    .hexlitho-progress-outer { height: 6px !important; }
    #hex3d-canvas-wrap { min-height: 300px !important; }
    .hexlitho-upload-area { padding: 30px 16px !important; }
    .hexlitho-upload-area svg { width: 36px !important; height: 36px !important; }
}
@media (max-width:480px) {
    .hexlitho-designer { padding: 8px !important; }
    .hexlitho-designer canvas { height: 280px !important; }
    #hex3d-canvas-wrap { min-height: 250px !important; }
    .hexlitho-hero h1 { font-size: 1.8rem !important; }
    .hexlitho-hero p { font-size: 0.95rem !important; }
    .hexlitho-gallery-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
}

/* ══ MOBILE RESPONSIVE ══ */
@media (max-width:768px) {
    .hexlitho-step2-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
    .hexlitho-upload-area { min-height: 200px; padding: 24px 16px; }
    .hexlitho-upload-icon svg { width: 36px; height: 36px; }
    .hexlitho-upload-btn { font-size: 15px; padding: 12px 24px; }
    .hexlitho-hero { padding: 40px 16px !important; }
    .hexlitho-hero h1 { font-size: 28px !important; }
    #c { height: 320px !important; }
    .hexlitho-progress-wrap { max-width: 100% !important; }
    #hex3d-controls { right: 8px !important; }
    #hex3d-controls button { width: 38px !important; height: 38px !important; font-size: 16px !important; }
    .hex-panel-btns button { min-width: 36px !important; height: 36px !important; font-size: 13px !important; }
}
@media (max-width:480px) {
    .hexlitho-hero h1 { font-size: 22px !important; }
    .hexlitho-hero .hexlitho-tagline { font-size: 13px !important; }
    #c { height: 260px !important; }
    .hex-panel-btns { gap: 4px !important; }
    .hex-panel-btns button { min-width: 32px !important; height: 32px !important; font-size: 12px !important; }
}
