/* ===== ROOT & RESET ===== */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg: #0a0a1a;
    --surface: rgba(255,255,255,0.04);
    --text: #e8e8ff;
    --text-dim: #8899aa;
    --glass-border: rgba(255,255,255,0.08);
    --font: 'Vazirmatn', 'Segoe UI', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* ===== BACKGROUND ORBS ===== */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #00f2ea, transparent 70%);
    top: -150px; right: -150px;
    animation: orbFloat1 8s ease-in-out infinite;
}

.orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #ff00ff, transparent 70%);
    bottom: -100px; left: -100px;
    animation: orbFloat2 10s ease-in-out infinite;
}

.orb-3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, #7b2dff, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat3 12s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 40px); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -30px); }
}

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

/* ===== GRID OVERLAY ===== */
.grid-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(0,242,234,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,242,234,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ===== GLASS CARD ===== */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 28px;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ===== MAIN WRAPPER ===== */
.main-wrap {
    position: relative;
    z-index: 10;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

/* ===== HERO SECTION ===== */
.hero {
    text-align: center;
    position: relative;
    padding: 60px 0;
}

.hero-title {
    font-size: clamp(3rem, 12vw, 7rem);
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(
        90deg,
        #ff0000, #ff7f00, #ffff00, #00ff00,
        #0000ff, #4b0082, #9400d3, #ff0000
    );
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rgbShift 4s linear infinite, heroBlurIn 1.5s ease-out;
    filter: blur(0px);
    text-shadow: 0 0 60px rgba(255,0,255,0.3);
    line-height: 1.1;
}

@keyframes rgbShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

@keyframes heroBlurIn {
    0% { filter: blur(20px); opacity: 0; transform: scale(0.8); }
    100% { filter: blur(0px); opacity: 1; transform: scale(1); }
}

.hero-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80%; height: 100%;
    background: radial-gradient(ellipse, rgba(0,242,234,0.15), transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* ===== WELCOME SECTION ===== */
.welcome {
    width: 100%;
}

.welcome-text {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--text-dim);
    text-align: center;
}

/* ===== CTA BUTTON ===== */
.cta-section {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.glass-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 48px;
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.glass-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,242,234,0.3);
    border-color: rgba(0,242,234,0.3);
}

.glass-btn:active {
    transform: translateY(0) scale(0.97);
}

/* RGB Shine Effect */
.rgb-shine {
    position: relative;
}

.rgb-shine::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #9400d3, #ff0000);
    background-size: 400%;
    border-radius: 18px;
    z-index: -1;
    animation: rgbGlow 3s linear infinite;
    opacity: 0.6;
    filter: blur(8px);
}

@keyframes rgbGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-shimmer {
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.glass-btn:hover .btn-shimmer {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* ===== SCROLL REVEAL ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== ADMIN HIDDEN LINK ===== */
.admin-hidden {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.15);
    text-decoration: none;
    z-index: 100;
    padding: 5px;
    transition: color 0.3s;
}

.admin-hidden:hover {
    color: rgba(255,255,255,0.5);
}

/* ===== PAGE HEADER ===== */
.page-header {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    transition: all 0.3s;
}

.back-link:hover {
    color: #00f2ea;
    border-color: rgba(0,242,234,0.3);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00f2ea, #7b2dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 60px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--surface);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,242,234,0.15);
    border-color: rgba(0,242,234,0.2);
}

.product-img-box {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-box img {
    transform: scale(1.08);
}

.img-placeholder {
    font-size: 4rem;
    opacity: 0.3;
}

.product-body {
    padding: 20px;
}

.product-body h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #fff;
}

.product-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.price {
    font-weight: 700;
    color: #00f2ea;
    font-size: 1rem;
}

.price.no-price {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.order-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #00f2ea, #7b2dff);
    color: #0a0a1a;
    font-weight: 700;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,242,234,0.2);
}

.order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,242,234,0.4);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: modalFade 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-inner {
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: modalSlide 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes modalSlide {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,71,87,0.3);
    transform: rotate(90deg);
}

.modal-inner h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #00f2ea, #7b2dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-inner p {
    color: var(--text-dim);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(0,0,0,0.3);
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid rgba(0,242,234,0.15);
    position: relative;
    overflow: hidden;
}

.contact-row::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0,242,234,0.05), transparent);
    animation: shimmerRotate 4s linear infinite;
}

@keyframes shimmerRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.phone-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    direction: ltr;
    display: inline-block;
    position: relative;
    z-index: 2;
}

.copy-btn {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(0,242,234,0.1);
    border: 1px solid rgba(0,242,234,0.2);
    color: #00f2ea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
    padding: 0;
}

.copy-btn svg {
    width: 20px; height: 20px;
}

.copy-btn:hover {
    background: rgba(0,242,234,0.2);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0,242,234,0.3);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-toast {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0,242,234,0.15);
    border: 1px solid rgba(0,242,234,0.3);
    color: #00f2ea;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

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

/* ===== ADMIN LOGIN ===== */
.page-admin {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrap {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
}

.login-card {
    padding: 40px;
    text-align: center;
}

.login-brand {
    margin-bottom: 30px;
}

.login-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.login-brand h2 {
    font-size: 1.6rem;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #00f2ea, #7b2dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-brand p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(255,71,87,0.1);
    border: 1px solid rgba(255,71,87,0.2);
    color: #ff4757;
}

.form-group {
    margin-bottom: 20px;
    text-align: right;
}

.form-group label {
    display: block;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #00f2ea;
    box-shadow: 0 0 15px rgba(0,242,234,0.1);
}

.form-group input::placeholder {
    color: rgba(136,153,170,0.4);
}

.btn-login,
.btn-save {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #00f2ea, #7b2dff);
    color: #0a0a1a;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-login:hover,
.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,242,234,0.3);
}

.back-home {
    display: block;
    margin-top: 20px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-home:hover {
    color: #00f2ea;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-wrap {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.admin-header h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #00f2ea, #7b2dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-logout {
    padding: 8px 20px;
    border-radius: 10px;
    background: rgba(255,71,87,0.1);
    border: 1px solid rgba(255,71,87,0.2);
    color: #ff4757;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255,71,87,0.2);
}

.admin-section {
    margin-bottom: 30px;
    padding: 28px;
}

.admin-section h2 {
    font-size: 1.2rem;
    margin-bottom: 24px;
    color: #fff;
}

.save-msg {
    margin-top: 12px;
    font-size: 0.9rem;
    min-height: 24px;
    transition: all 0.3s;
}

.admin-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: rgba(0,0,0,0.2);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.05);
}

.ap-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ap-thumb {
    width: 50px; height: 50px;
    border-radius: 10px;
    object-fit: cover;
}

.ap-info strong {
    display: block;
    color: #fff;
    margin-bottom: 4px;
}

.ap-price {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.btn-del {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(255,71,87,0.1);
    border: 1px solid rgba(255,71,87,0.2);
    color: #ff4757;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn-del:hover {
    background: rgba(255,71,87,0.25);
    transform: scale(1.1);
}

.empty-msg {
    text-align: center;
    color: var(--text-dim);
    padding: 30px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: rgba(0,242,234,0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0,242,234,0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .main-wrap {
        padding: 16px;
        gap: 30px;
    }
    .hero-title {
        letter-spacing: 2px;
    }
    .glass-btn {
        padding: 16px 36px;
        font-size: 1.1rem;
    }
    .products-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 40px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .login-card {
        padding: 28px 20px;
    }
    .admin-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .admin-product-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .phone-num {
        font-size: 1.3rem;
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .contact-row {
        flex-direction: column;
        gap: 12px;
    }
}
