:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #121212;
    --accent-color: #00d2ff;
    --accent-hover: #3a7bd5;
    --text-main: #ffffff;
    --text-dim: #b0b0b0;
    --card-bg: #1e1e1e;
    --border-color: #333333;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: rgba(10, 10, 10, 0.95);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: clamp(10px, 3vw, 30px);
}

nav ul li a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

nav ul li a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    margin: 3px 0;
    transition: 0.4s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://images.unsplash.com/photo-1556656793-062ff9878258?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 120px 0 60px;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h2 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 20px;
    font-weight: 700;
    min-height: 4.5rem; /* Ensure space for the ticker text */
    color: var(--accent-color);
    transition: opacity 0.5s ease-in-out;
}

.ticker-fade-out {
    opacity: 0;
}

.hero-content h3 {
    margin-bottom: 24px;
}

.products.section {
    padding-top: 100px; /* Default */
}

/* Adjusting specific sections if needed, but standardizing is better */
#covers, #accessories {
    padding-top: 50px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: #000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-3px);
}

/* Common Section Styles */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 10px auto;
}

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, border 0.3s ease;
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.card-image {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.card-image.mobiles { background-image: url('https://img.icons8.com/ios-filled/100/00d2ff/smartphone-tablet'); }
.card-image.accessories { background-image: url('https://img.icons8.com/ios-filled/100/00d2ff/phone-case'); }
.card-image.maintenance { background-image: url('https://img.icons8.com/ios-filled/100/00d2ff/maintenance');}
.card-image.airpods3 { background-image: url('https://img.icons8.com/ios-filled/100/00d2ff/airpods-3');}

.category-card h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.category-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Products Grid & Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 850px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.product-card {
    background-color: var(--secondary-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.1);
}

.product-img-placeholder {
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: #000;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-placeholder {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.condition {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.price {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: auto;
    color: var(--text-main);
}

.view-details-btn {
    margin-top: 15px;
    padding: 10px;
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.product-card:hover .view-details-btn {
    background-color: var(--accent-color);
    color: #000;
}

/* Modal System */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: var(--secondary-bg);
    margin: 5% auto;
    padding: 40px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 1000px;
    border-radius: 20px;
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 15px;
    color: var(--text-dim);
    font-size: 30px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2001;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-body {
    display: flex;
    gap: 40px;
}

.modal-image {
    flex: 1.2;
    height: 500px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #050505;
    border-radius: 12px;
}

.modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-info h2 {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    margin-bottom: 10px;
    color: var(--text-main);
    line-height: 1.2;
}

.modal-description {
    margin: 20px 0;
}

.modal-description h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-description p {
    color: var(--text-dim);
    line-height: 1.8;
}

.modal-features {
    list-style: none;
    margin: 20px 0;
}

.modal-features li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.modal-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.modal-cta {
    margin-top: auto;
    padding-top: 20px;
}

@media (max-width: 900px) {
    .modal-body {
        flex-direction: column;
    }
    .modal-image {
        height: 350px;
    }
    .modal-content {
        margin: 2% auto;
        padding: 25px;
    }
}

/* About Section */
.product-img-placeholder {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.condition {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
}

.price {
    font-weight: 700;
    margin-top: 10px;
}

/* About Section */
.about-flex {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    height: 400px;
    background: url('https://images.unsplash.com/photo-1550009158-9ebf69173e03?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
    color: var(--text-dim);
}

.working-hours-list {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
    color: var(--text-dim);
}

.working-hours-list li {
    margin-bottom: 8px;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 15px;
    font-weight: 700;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 5px;
}

.contact-form textarea {
    height: 150px;
}

.contact-form button {
    width: 100%;
    cursor: pointer;
}

/* Back to Top Button */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background-color: var(--accent-color);
    color: #000;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 1.5rem;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

#back-to-top:hover {
    background-color: var(--accent-hover);
    color: #fff;
    transform: scale(1.1) translateY(-10px);
}

/* Map Container */
.map-container {
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* Footer */
footer {
    padding: 30px 0;
    background-color: var(--secondary-bg);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer p {
    color: var(--text-dim);
}

.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--primary-bg);
        transition: 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
        display: flex;
        justify-content: center;
        align-items: center;
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 20px 0;
    }

    nav ul li a {
        font-size: 1.5rem;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .about-flex {
        flex-direction: column;
        gap: 30px;
    }

    .about-image {
        height: 250px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}
