/* All Phones Market - Journal 3 Inspired Design */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 10px 30px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--primary-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography - Journal 3 Style */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { 
    font-size: 3.5rem; 
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

h2 { 
    font-size: 2.8rem; 
    position: relative;
    margin-bottom: 2rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

h3 { font-size: 2.2rem; }
h4 { font-size: 1.8rem; }
h5 { font-size: 1.4rem; }
h6 { font-size: 1.2rem; }

p {
    margin-bottom: 1.5rem;
    color: #5a6c7d;
    font-size: 1.1rem;
    line-height: 1.8;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: var(--transition);
}

a:hover::after {
    width: 100%;
}

/* Header Styles - Journal 3 Inspired */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.header:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-medium);
}

.top-bar {
    background: var(--gradient-primary);
    padding: 12px 0;
    font-size: 0.9rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.top-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.contact-info span {
    margin-right: 25px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.contact-info i {
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.top-links {
    text-align: right;
}

.top-links a {
    margin-left: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    transition: var(--transition);
}

.top-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Navigation - Journal 3 Style */
.navbar {
    padding: 20px 0;
    background: transparent;
}

.navbar-brand img {
    max-height: 60px;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--primary-color) !important;
    padding: 12px 20px !important;
    margin: 0 5px;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    font-size: 1rem;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-accent);
    border-radius: 25px;
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    opacity: 1;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-heavy);
    border-radius: var(--border-radius);
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-top: 10px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 12px 25px;
    color: var(--primary-color);
    transition: var(--transition);
    font-weight: 500;
    position: relative;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--gradient-accent);
    transition: var(--transition);
}

.dropdown-item:hover::before {
    width: 4px;
}

.dropdown-item:hover {
    background: rgba(79, 172, 254, 0.1);
    color: var(--secondary-color);
    padding-left: 35px;
}

/* Search Form - Journal 3 Style */
.search-form {
    margin-left: 30px;
}

.search-form .form-control {
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 20px;
    width: 280px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
}

.search-form .form-control::placeholder {
    color: rgba(44, 62, 80, 0.6);
}

.search-form .form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: rgba(255, 255, 255, 0.95);
    outline: none;
}

.search-form .btn {
    border-radius: 0 30px 30px 0;
    border: 2px solid var(--secondary-color);
    background: var(--gradient-accent);
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.search-form .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.search-form .btn:hover::before {
    left: 100%;
}

.search-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Hero Section - Journal 3 Style */
.hero-section {
    position: relative;
    height: 70vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="300" fill="url(%23a)"/><circle cx="800" cy="800" r="400" fill="url(%23a)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.hero-slide {
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    position: relative;
    background-attachment: fixed;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 600px;
    animation: slideInUp 1s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: rgba(255,255,255,0.95);
    line-height: 1.6;
    font-weight: 400;
}

.hero-content .btn {
    padding: 16px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    background: var(--gradient-accent);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
}

.hero-content .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.hero-content .btn:hover::before {
    left: 100%;
}

.hero-content .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* Features Section */
.features-section {
    background: #f8f9fa;
}

.feature-box {
    padding: 30px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
}

.feature-box h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-box p {
    color: #666;
    margin-bottom: 0;
}

/* Products Section */
.products-section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-overlay .btn {
    margin: 0 5px;
    border-radius: 25px;
    padding: 8px 20px;
    font-size: 0.9rem;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1.3;
}

.product-brand {
    color: #007bff;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.product-price {
    margin-bottom: 10px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #28a745;
}

.original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.product-stock {
    font-size: 0.9rem;
    margin-top: auto;
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
}

.category-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.category-image {
    height: 200px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-content {
    padding: 30px 20px;
    text-align: center;
}

.category-content h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.category-content p {
    color: #666;
    margin-bottom: 20px;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.newsletter-section h3 {
    color: white;
    font-weight: 700;
    margin-bottom: 15px;
}

.newsletter-section p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 0;
}

.newsletter-form .form-control {
    border-radius: 25px;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
}

.newsletter-form .btn {
    border-radius: 25px;
    padding: 12px 25px;
    background: white;
    color: #007bff;
    font-weight: 600;
    border: none;
}

.newsletter-form .btn:hover {
    background: #f8f9fa;
    color: #0056b3;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul li a {
    color: rgba(255,255,255,0.8);
    transition: color 0.3s ease;
}

.footer ul li a:hover {
    color: white;
}

.footer ul li i {
    margin-right: 8px;
    color: #007bff;
    width: 15px;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #007bff;
    color: white;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #0056b3;
    transform: translateY(-3px);
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.btn-outline-primary {
    border: 2px solid #007bff;
    color: #007bff;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
}

/* Forms */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 40px;
}

.page-link {
    border: none;
    color: #007bff;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: #007bff;
    border-color: #007bff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .search-form .form-control {
        width: 200px;
    }
    
    .top-links {
        text-align: center;
        margin-top: 10px;
    }
    
    .contact-info {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .newsletter-section .col-md-6:first-child {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .footer .col-lg-3 {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .footer .text-right {
        text-align: center !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .search-form .form-control {
        width: 150px;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
    
    .feature-box {
        margin-bottom: 20px;
    }
    
    .category-card {
        margin-bottom: 20px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.py-5 { padding: 3rem 0; }
.py-4 { padding: 2rem 0; }
.py-3 { padding: 1rem 0; }

.bg-light { background-color: #f8f9fa; }
.bg-primary { background-color: #007bff; }
.bg-dark { background-color: #2c3e50; }

.shadow { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175); }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 1rem; }

/* Print Styles */
@media print {
    .header, .footer, .btn, .pagination {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}
