/* ===================================================================
   MOBILEPHONES.LK - MERGED ENHANCED STYLE.CSS
   Fixed: All duplicates removed, 2-column mobile display, proper formatting
   =================================================================== */

/* 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;
    display: flex;
    flex-direction: column;
    min-height: 100vh;  /* Fallback for older browsers */
    min-height: 100dvh; /* New fix for mobile browsers */
}


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;
    align-items: center;
    padding: 10px 20px !important;
    position: relative;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 10px;
    margin-right: auto;
}

.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;
}

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;
    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);
}

/* ===================================================================
   FILTERS SECTION
   =================================================================== */
.filters-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filters-container {
    max-width: 100%;
    width: 100%;
}

.filters-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #003366;
    font-size: 1.2rem;
    margin-bottom: 0;
    gap: 10px;
}

.filters-title i {
    margin-right: 8px;
}

.btn-toggle-filters {
    background: #0066cc;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-toggle-filters:hover {
    background: #0052a3;
}

.btn-toggle-filters i {
    margin-left: 6px;
}

.filters-form {
    margin-top: 20px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background: white;
    box-sizing: border-box;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #0066cc;
    background: #f8f9fa;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.price-inputs .filter-input {
    flex: 1;
    min-width: 0;
}

.price-separator {
    color: #666;
    font-weight: 600;
    flex-shrink: 0;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 10px;
    width: 100%;
}

.btn-apply-filters,
.btn-clear-filters {
    width: 100%;
    padding: 14px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-sizing: border-box;
}

.btn-apply-filters {
    background: #28a745;
    color: white;
}

.btn-apply-filters:hover {
    background: #218838;
}

.btn-clear-filters {
    background: #6c757d;
    color: white;
}

.btn-clear-filters:hover {
    background: #5a6268;
}

/* ===================================================================
   ACTIVE FILTERS DISPLAY
   =================================================================== */
.active-filters {
    background: #e3f2fd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
}

.active-filters h3 {
    color: #0066cc;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    background: #0066cc;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-tag a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

.filter-tag a:hover {
    color: #ffcc00;
}

/* ===================================================================
   MAIN CONTENT
   =================================================================== */
main {
    max-width: 1200px;
    margin: 0 auto;    /* Removed vertical margin (30px -> 0) */
    padding: 30px 20px; /* Moved the spacing to padding */
    flex: 1;
    width: 100%;
}


.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;
}

/* ===================================================================
   ENHANCED PHONE CARDS GRID - 2 COLUMNS MOBILE
   =================================================================== */
.phones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 20px;
    padding: 10px;
}

.phone-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.phone-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
    border-color: #0066cc;
}

.phone-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.phone-img {
    width: 100%;
    max-width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 8px;
    transition: transform 0.3s ease;
}

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

.phone-name {
    color: #003366;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.phone-price-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
}

.phone-price-info .price {
    font-size: 0.9rem;
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 3px;
}

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

/* ===================================================================
   SEARCH RESULTS SECTION
   =================================================================== */
.results-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.results-title {
    color: #003366;
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Empty States */
.no-results,
.search-prompt {
    text-align: center;
    padding: 50px 20px;
}

.no-results i,
.search-prompt i {
    color: #0066cc;
    margin-bottom: 15px;
    opacity: 0.6;
}

.no-results h3,
.search-prompt h3 {
    color: #003366;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.no-results p,
.search-prompt p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===================================================================
   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 - ENHANCED 2-COLUMN MOBILE
   =================================================================== */

/* Mobile-first responsive design */
@media (max-width: 480px) {
    .phones-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 8px;
    }
    
    .phone-card {
        padding: 8px;
    }
    
    .phone-img {
        max-width: 90px;
        height: 90px;
        margin-bottom: 6px;
    }
    
    .phone-name {
        font-size: 0.8rem;
        min-height: 32px;
    }
    
    .phone-price-info .price {
        font-size: 0.85rem;
    }
    
    /* Header mobile adjustments */
    .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;
    }
    
    /* Filters mobile adjustments */
    .filters-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .filters-title {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-toggle-filters {
        width: 100%;
        text-align: center;
    }

    .filter-select,
    .filter-input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .price-inputs {
        gap: 8px;
    }

    .price-separator {
        font-size: 0.9rem;
    }

    .btn-apply-filters,
    .btn-clear-filters {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .results-section {
        padding: 15px;
    }

    .results-title {
        font-size: 1.1rem;
    }
}

@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));
    }

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

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

/* Tablet view - 3 columns */
@media (min-width: 481px) and (max-width: 768px) {
    .phones-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .filters-section {
        padding: 25px;
    }

    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .filter-actions {
        flex-direction: row;
        justify-content: center;
    }

    .btn-apply-filters,
    .btn-clear-filters {
        width: auto;
        min-width: 180px;
    }

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

    .phone-img {
        max-width: 140px;
        height: 140px;
    }

    .phone-name {
        font-size: 0.95rem;
    }

    .results-title {
        font-size: 1.3rem;
    }
}

/* Desktop view - 4+ columns */
@media (min-width: 769px) {
    .phones-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 20px;
    }
    
    .phone-card {
        padding: 15px;
    }
    
    .phone-img {
        max-width: 120px;
        height: 120px;
    }
    
    .phone-name {
        font-size: 0.9rem;
    }
    
    /* Desktop filters */
    .filters-section {
        padding: 30px;
    }

    .filters-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    .filter-select,
    .filter-input {
        font-size: 0.95rem;
        padding: 12px 15px;
    }

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

    .phone-img {
        max-width: 150px;
        height: 150px;
    }

    .phone-name {
        font-size: 1rem;
    }

    .phone-price-info .price {
        font-size: 1.1rem;
    }

    .results-section {
        padding: 25px;
    }
}

/* ===================================================================
   FIX FOR OVERFLOW ISSUES
   =================================================================== */
.search-page {
    overflow-x: hidden;
}

.search-page .container {
    max-width: 100%;
    overflow-x: hidden;
}

select,
input,
button {
    max-width: 100%;
}


/* ===================================================================
   COMPACT BRAND LAYOUT - FIXED VERSION
   Single brand logo: 120x120 on ALL devices, left aligned
   =================================================================== */

/* Single Brand Page - Compact Header */
.brand-header-compact {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #003366;
}

.brand-logo-small {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.brand-header-compact h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #003366;
    flex: 1;
}

/* All Brands Page - Compact Grid */
.brands-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

/* Compact Brand Card */
.brand-card-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.brand-card-compact:hover {
    border-color: #003366;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 51, 102, 0.12);
}

/* Small Brand Logo Box */
.brand-logo-box {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 15px;
    border: 1px solid #f0f0f0;
}

.brand-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Small Placeholder */
.brand-logo-placeholder-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
    border-radius: 6px;
}

.brand-logo-placeholder-small i {
    font-size: 2.5rem;
    color: #bbb;
}

/* Brand Name */
.brand-card-compact h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #003366;
    font-weight: 600;
    line-height: 1.3;
}

/* Phone Count Badge (Only if > 0) */
.phone-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #003366;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .brands-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .brand-card-compact {
        padding: 15px 10px;
    }
    
    .brand-logo-box {
        width: 100px;
        height: 100px;
        padding: 12px;
    }
    
    .brand-card-compact h3 {
        font-size: 1rem;
    }
    
    /* Single Brand Mobile - FIXED: Keep 120x120 */
    .brand-header-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .brand-logo-small {
        width: 120px;  /* Keep 120x120 on mobile */
        height: 120px;
    }
    
    .brand-header-compact h1 {
        font-size: 1.5rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .brands-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    /* Keep 120x120 on tablet too */
    .brand-logo-small {
        width: 120px;
        height: 120px;
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .brands-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}
/* ===================================================================
   PAGINATION STYLES - Add to style.css
   =================================================================== */

/* Brand Description */
.brand-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
  
}

.brand-description p {
    line-height: 1.8;
    color: #333;
    margin: 0;
}

/* Pagination Container */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0 20px 0;
    flex-wrap: wrap;
}

/* Pagination Buttons */
.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #003366;
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination-btn:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

/* Pagination Numbers */
.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    color: #003366;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination-number:hover {
    background: #f0f0f0;
    border-color: #003366;
}

.pagination-number.active {
    background: #003366;
    color: white;
    border-color: #003366;
}

.pagination-dots {
    color: #999;
    padding: 0 5px;
}

/* Pagination Info */
.pagination-info {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin: 10px 0 30px 0;
}

/* Phone Price Info (same as index.php) */
.phone-price-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

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

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

.phone-price-info .price-na {
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results p {
    font-size: 1.1rem;
    margin: 20px 0;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: #003366;
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 15px;
    }

    .pagination-numbers {
        order: 2;
    }

    .pagination-btn {
        width: 100%;
        justify-content: center;
    }
}