:root {
    --primary-color: #E62222;
    --primary-hover: #CC1E1E;
    --text-main: #111111;
    --text-muted: #666666;
    --bg-main: #FFFFFF;
    --bg-alt: #F9F9F9;
    --border-color: #E5E5E5;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.4;
    overflow-x: hidden;
}

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

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Modern Header */
.modern-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.modern-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 36px;
}

.main-nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    position: relative;
    padding: 6px 0;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.main-nav a.active::after, .main-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
}

.lang-switch a.active {
    color: var(--text-main);
}

.lang-switch a:hover {
    color: var(--primary-color);
}

.lang-switch .divider {
    margin: 0 4px;
    opacity: 0.5;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-header {
    padding: 8px 16px;
    border-radius: 6px;
}

.btn-dark {
    background-color: #111;
    color: #fff;
}

.btn-dark:hover {
    background-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background-color: var(--bg-alt);
}

/* Hero Section */
.hero {
    padding: 40px 0 30px;
    position: relative;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    max-width: 50%;
}

.badge {
    display: inline-block;
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 52px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 12px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.floating-img {
    max-width: 110%;
    max-height: 380px;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.1));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Equipment Section */
.equipment {
    padding: 30px 0 40px;
    border-top: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.section-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -1px;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 13px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--text-main);
}

.view-all:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.equipment-grid {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
}

.equipment-card {
    flex: 1;
    background: var(--bg-main);
    border-right: 1px solid var(--border-color);
    padding: 10px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.equipment-card:first-child {
    padding-left: 0;
}

.equipment-card:last-child {
    border-right: none;
    padding-right: 0;
}

.card-image-wrapper {
    background: var(--bg-main);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.card-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.equipment-card:hover .card-image-wrapper img {
    transform: scale(1.05) translateY(-3px);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer h3 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.arrow-icon {
    color: var(--primary-color);
    opacity: 0;
    transform: translateX(-5px);
    transition: var(--transition);
}

.equipment-card:hover .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

/* Footer Text */
.footer-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-text a {
    color: var(--text-main);
    text-decoration: underline;
    font-weight: 600;
}

.footer-text a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 40px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        justify-content: center;
    }
    
    .equipment-grid {
        flex-direction: column;
    }
    
    .equipment-card {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px 0;
    }
    
    .equipment-card:last-child {
        border-bottom: none;
    }
    
    .main-nav {
        display: none;
    }
}

/* --- Store Layout (Catalog Page) --- */
.bg-gray {
    background-color: #F5F5F7;
}

/* Ecommerce Header */
.ecommerce-header {
    background: #FFF;
    border-bottom: 1px solid #EAEAEA;
    padding: 16px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ecommerce-header .logo-img {
    height: 32px;
}

.btn-catalog {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
}

.search-bar {
    flex: 1;
    background: #F5F5F7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 44px;
}

.search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    font-family: var(--font-main);
}

.user-actions {
    display: flex;
    gap: 24px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #111;
}

.action-item:hover {
    color: var(--primary-color);
}

.header-divider {
    width: 1px;
    height: 24px;
    background-color: #EAEAEA;
}

/* Sub Nav */
.sub-nav {
    background: #FFF;
    border-bottom: 1px solid #EAEAEA;
}

.sub-nav .container {
    display: flex;
    gap: 32px;
    height: 48px;
    align-items: center;
}

.sub-nav a {
    font-size: 13px;
    font-weight: 500;
    color: #444;
}

.sub-nav a:hover {
    color: var(--primary-color);
}

/* Store Main */
.store-main {
    padding: 30px 0 60px;
}

/* Promo Banner */
.promo-banner {
    background: #EAEAEA;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    margin-bottom: 40px;
    min-height: 280px;
}

.banner-content {
    padding: 60px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.banner-content h2 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
}

.banner-content p {
    font-size: 16px;
    color: #555;
    margin-bottom: 24px;
}

.banner-images {
    width: 50%;
    position: relative;
    display: flex;
    align-items: center;
}

.banner-img-1 {
    width: 320px;
    position: absolute;
    right: 260px;
    top: 50%;
    transform: translateY(-50%) rotate(-5deg);
    z-index: 2;
}

.banner-img-2 {
    width: 280px;
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.banner-text {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 10px;
    font-weight: 700;
    color: #888;
    text-align: right;
    letter-spacing: 1px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal-content {
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.modal-close {
    position: absolute;
    top: 20px; right: 25px;
    background: none; border: none;
    font-size: 32px; cursor: pointer; color: #999;
    line-height: 1;
}
.modal-close:hover {
    color: #000;
}
.modal-title {
    font-size: 28px; font-weight: 800; margin-bottom: 30px; text-align: center;
}

/* Bundle Builder */
.bundle-steps {
    display: flex; justify-content: space-between; margin-bottom: 30px;
    border-bottom: 2px solid #EEE; padding-bottom: 15px;
}
.bundle-steps .step {
    flex: 1; text-align: center; font-weight: 600; color: #aaa;
    font-size: 14px;
    transition: color 0.3s;
}
.bundle-steps .step.active {
    color: #000;
}
.bundle-steps .step.completed {
    color: #4CAF50;
}

.step-content {
    display: none;
}
.step-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

.bundle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 768px) {
    .bundle-grid { grid-template-columns: repeat(2, 1fr); }
}

.bundle-item {
    border: 2px solid #EAEAEA;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    background: #fff;
}
.bundle-item:hover {
    border-color: #CCC;
}
.bundle-item.selected {
    border-color: #000;
    background: #FAFAFA;
}
.bundle-item img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}
.bundle-item h4 {
    font-size: 15px; font-weight: 600; margin-bottom: 5px;
}
.bundle-item .price {
    font-size: 14px; color: #555;
    font-weight: 600;
}

.bundle-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #EEE;
}
.bundle-footer .btn {
    min-width: 120px;
}

/* Bundle Summary */
.bundle-summary ul {
    list-style: none; padding: 0; margin-bottom: 20px;
}
.bundle-summary li {
    display: flex; justify-content: space-between;
    padding: 16px 0; border-bottom: 1px solid #EEE;
    font-size: 16px;
}
.bundle-summary .bundle-total {
    font-size: 28px; font-weight: 800; text-align: right; margin-top: 20px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.banner-text span {
    color: var(--primary-color);
}

/* Catalog Section */
.store-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
}

.catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid #EAEAEA;
    margin-bottom: 24px;
}

.catalog-tabs {
    display: flex;
    gap: 32px;
}

.catalog-tabs a {
    padding-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid transparent;
}

.catalog-tabs a.active, .catalog-tabs a:hover {
    color: #111;
    border-bottom-color: var(--primary-color);
}

.sort-dropdown {
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 12px;
    cursor: pointer;
}

/* Store Grid */
.store-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.store-card {
    background: #FFF;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    border: 1px solid #EAEAEA;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.store-card:hover {
    border-color: #CCC;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.heart-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    cursor: pointer;
    z-index: 2;
}

.heart-icon:hover svg {
    stroke: var(--primary-color);
}

.store-card-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.store-card-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.store-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.3;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-size: 18px;
    font-weight: 800;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
}

/* Site Footer */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid #EAEAEA;
    background: #FFF;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.footer-links a {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* =========================================
   AUTH & PROFILE MODALS CSS
========================================= */
.auth-modal {
    max-width: 400px;
    padding: 32px;
}
.profile-modal {
    max-width: 500px;
    padding: 32px;
}

.auth-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}
.auth-tab {
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
    position: relative;
}
.auth-tab:hover {
    color: #fff;
}
.auth-tab.active {
    color: #fff;
}
.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #007aff;
    border-radius: 2px;
}

.auth-form {
    display: none;
}
.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: #bbb;
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s;
}
.form-group input:focus {
    outline: none;
    border-color: #007aff;
    background: rgba(255, 255, 255, 0.1);
}

.auth-error {
    color: #ff4757;
    font-size: 13px;
    margin-bottom: 16px;
    min-height: 18px;
}

/* Profile Info */
.profile-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    margin-top: 16px;
}
.profile-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #007aff 0%, #00d2ff 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.profile-info h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
}
.profile-id {
    margin: 0;
    color: #999;
    font-size: 14px;
}
.profile-id strong {
    color: #00d2ff;
}

/* Profile Stats */
.profile-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #00d2ff;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Referrals List */
.referrals-list {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}
.referral-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.referral-item:last-child {
    border-bottom: none;
}
.referral-email {
    font-size: 14px;
    color: #ddd;
}
.referral-date {
    font-size: 12px;
    color: #777;
}

/* Avatar on navbar */
.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007aff 0%, #00d2ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
    transition: transform 0.3s;
}
.nav-avatar:hover {
    transform: scale(1.05);
}
