/* ===================================================================
   MOBILEPHONES.LK - CLEAN STYLE.CSS (NO DUPLICATES)
   Fixed: All duplicates removed, proper formatting, logo aligned left
   =================================================================== */

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===================================================================
   HEADER - SINGLE DEFINITION (Logo Aligned LEFT)
   =================================================================== */
header {
    background: linear-gradient(135deg, #003366 0%, #004d99 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start !important; /* LEFT align - NOT space-between */
    align-items: center;
    padding: 10px 20px !important; /* Reduced padding */
    position: relative;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 10px;
    margin-right: auto; /* Pushes nav to the right */
}

.logo a,
.logo-link {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
}

.logo a:hover {
    color: #ffcc00;
}

.logo img,
.site-logo-img {
    height: 45px;
    width: auto;
    display: block;
    object-fit: contain;
    margin: 0 !important;
    padding: 0 !important;
}

nav {
    display: flex;
    margin-left: auto; /* Keeps nav on the right */
}

nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    display: block;
}

nav ul li a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    margin-left: auto;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 200px;
    z-index: 1000;
    margin-top: 10px;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    flex-direction: column;
    gap: 0;
}

.mobile-menu ul li {
    padding: 0;
    margin: 0;
}

.mobile-menu ul li a {
    display: block;
    padding: 12px 20px;
    color: #003366;
    text-decoration: none;
    text-align: left !important; /* LEFT align */
    font-weight: 500;
}

.mobile-menu ul li a:hover {
    background: #f0f0f0;
}

/* ===================================================================
   SEARCH SECTION
   =================================================================== */
.search-container {
    background: white;
    padding: 25px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-box {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #003366;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
}

.search-box input:focus {
    border-color: #0066cc;
    box-shadow: 0 0 10px rgba(0,102,204,0.2);
}

.search-box button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* ===================================================================
   MAIN CONTENT
   =================================================================== */
main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

section {
    margin-bottom: 50px;
}

h2 {
    color: #003366;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #003366;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: #ffcc00;
}

/* ===================================================================
   BRANDS GRID
   =================================================================== */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.brand-item {
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.brand-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #003366;
}

.brand-item a {
    color: #003366;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ===================================================================
   PHONE CARDS GRID
   =================================================================== */
.phones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.phone-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid #f0f0f0;
}

.phone-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
    border-color: #003366;
}

.phone-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.phone-card:hover img {
    transform: scale(1.05);
}

.phone-card h3 {
    color: #003366;
    font-size: 1rem;
    margin: 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================================================================
   PRODUCT DETAIL PAGE
   =================================================================== */
.phone-detail-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.phone-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.phone-image-container {
    text-align: center;
}

.phone-image {
    width: 100%;
    max-width: 350px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    background: #fafafa;
}

.phone-info h1 {
    color: #003366;
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.price-update {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255,107,107,0.3);
}

.phone-info p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

/* ===================================================================
   TABLES
   =================================================================== */
.spec-table,
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.spec-table th,
.price-table th {
    background: linear-gradient(135deg, #003366 0%, #004d99 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.spec-table td,
.price-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.spec-table tr:hover,
.price-table tr:hover {
    background-color: #f8f9fa;
}

.spec-table td:first-child {
    font-weight: 600;
    color: #003366;
    width: 35%;
}

.price-table a {
    color: #0066cc;
    font-weight: 600;
    padding: 8px 16px;
    background: #e3f2fd;
    border-radius: 5px;
    display: inline-block;
}

.price-table a:hover {
    background: #0066cc;
    color: white;
}

/* ===================================================================
   STORES GRID
   =================================================================== */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.store-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid #f0f0f0;
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-color: #003366;
}

.store-logo {
    max-width: 180px;
    max-height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
}

.store-card h3 {
    color: #003366;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.store-card p a {
    color: white;
    background: #003366;
    padding: 10px 25px;
    border-radius: 25px;
    display: inline-block;
    font-weight: 600;
}

.store-card p a:hover {
    background: #0066cc;
}

/* ===================================================================
   FORMS
   =================================================================== */
.review-section,
.contact-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #003366;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 10px rgba(0,51,102,0.1);
}

.btn-submit {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: white;
    padding: 14px 35px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* ===================================================================
   ADMIN PANEL
   =================================================================== */
.admin-nav {
    background: #004d99;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-nav a {
    color: white;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 5px;
    display: inline-block;
    font-weight: 500;
}

.admin-nav a:hover {
    background: #003366;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: white;
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-card h3 {
    color: white;
    font-size: 2.5rem;
    margin: 0;
}

/* ===================================================================
   FOOTER
   =================================================================== */
footer {
    background: linear-gradient(135deg, #003366 0%, #001a33 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer-container p {
    margin: 8px 0;
    opacity: 0.9;
}

/* ===================================================================
   ALERT MESSAGES
   =================================================================== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===================================================================
   RESPONSIVE DESIGN - MOBILE
   =================================================================== */
@media (max-width: 768px) {
    nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-container {
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 8px 20px !important;
    }

    .logo {
        margin-right: auto;
    }

    .logo img,
    .site-logo-img {
        height: 38px;
    }

    .phone-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .phones-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 6px 15px !important;
    }

    .logo a {
        font-size: 1.5rem;
    }

    .logo img,
    .site-logo-img {
        height: 35px;
    }

    nav ul li a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .phone-info h1 {
        font-size: 1.5rem;
    }

    .mobile-menu {
        right: 10px;
        min-width: 180px;
    }
}
.phone-price-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
}

.phone-price-info .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff6b6b;
}

.phone-price-info .stores {
    font-size: 0.85rem;
    color: #666;
}
