/* Main Frontend Styles - Mobile First Responsive Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --text: #374151;
    --border: #e5e7eb;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
        max-width: 100%;
    }
}

/* Header Styles */
.header-top {
    background: var(--dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-contact,
.header-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-contact span,
.header-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-links a:hover {
    color: var(--primary);
}

.header-main {
    background: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    .header-main {
        padding: 10px 0;
    }
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .header-content {
        gap: 8px;
        justify-content: space-between;
    }
    
    /* Mobile header layout: Logo | Menu | Cart */
    .mobile-menu-btn {
        order: 1;
        flex: 0 0 40px;
    }
    
    .logo {
        order: 2;
        flex: 1 1 auto;
        text-align: center;
        min-width: 0;
    }
    
    .logo a {
        justify-content: center;
    }
    
    .header-actions {
        order: 3;
        flex: 0 0 auto;
        flex-shrink: 0;
    }
    
    .search-bar {
        order: 4;
        flex: 1 1 100%;
        margin-top: 10px;
    }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
    white-space: nowrap;
}

.logo-img {
    height: 50px;
    width: auto;
    flex-shrink: 0;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .logo {
        flex: 0 0 auto;
    }
    
    .logo-text {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 20px;
    }
}

.search-bar {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.search-form {
    display: flex;
    max-width: 600px;
    width: 100%;
}

@media (max-width: 768px) {
    .search-bar {
        order: 4;
        flex-basis: 100%;
        margin-top: 10px;
    }
    
    .search-form {
        max-width: 100%;
    }
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 25px 0 0 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-btn {
    padding: 12px 25px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .header-actions {
        gap: 5px;
    }
    
    .header-actions a:not(.cart-btn) {
        padding: 8px 10px !important;
        font-size: 18px !important;
    }
}

.cart-btn {
    position: relative;
    padding: 12px 20px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 25px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cart-btn {
        padding: 10px 15px;
        font-size: 16px;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .cart-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}

.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(236,72,153,0.3);
}

.cart-count {
    background: var(--white);
    color: var(--secondary);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Navigation */
.header-nav {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 15px 25px;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background: rgba(255,255,255,0.15);
}

.dropdown-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu li a:hover {
    background: var(--light);
    color: var(--primary);
    padding-left: 25px;
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 400px);
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    margin-top: 80px;
}

.footer-main {
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-col p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--primary);
    font-size: 16px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
}

.footer-bottom i {
    color: var(--danger);
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99,102,241,0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #db2777);
    color: var(--white);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(236,72,153,0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
    width: 100%;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .product-card {
        border-radius: 12px;
    }
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--danger);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-current {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.price-original {
    font-size: 16px;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-add-cart {
    flex: 1;
    padding: 10px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

/* Article Cards */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 30px 0;
    width: 100%;
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.article-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-content {
    padding: 25px;
}

.article-category {
    display: inline-block;
    background: rgba(99,102,241,0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.article-title a {
    color: var(--dark);
    text-decoration: none;
}

.article-title a:hover {
    color: var(--primary);
}

.article-excerpt {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #9ca3af;
}

/* AdSense Containers */
.ad-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    text-align: center;
    background: var(--light);
    border-radius: 8px;
}

.ad-header {
    margin-top: 0;
    margin-bottom: 20px;
}

.ad-content {
    margin: 40px auto;
}

.ad-footer {
    margin-top: 40px;
    margin-bottom: 0;
}

/* Utility Classes */
.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
    text-align: center;
}

.section-subtitle {
    font-size: 18px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 40px;
}

.text-center {
    text-align: center;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-30 {
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        position: relative;
    }
    
    * {
        max-width: 100%;
    }
    
    .header-top .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 0 10px;
    }
    
    .header-contact,
    .header-links {
        flex-direction: column;
        gap: 5px;
        font-size: 12px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-content {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .search-bar {
        order: 4;
        width: 100%;
        flex-basis: 100%;
    }
    
    .search-form {
        max-width: 100%;
        width: 100%;
    }
    
    .search-input {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .search-btn,
    #voiceSearchBtn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .cart-btn {
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .header-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: 4px 0 15px rgba(0,0,0,0.2);
        transition: left 0.3s ease;
        z-index: 2000;
    }
    
    .header-nav.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: 20px 0;
    }
    
    .nav-menu > li > a {
        color: var(--dark);
        padding: 15px 20px;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-menu > li > a:hover,
    .nav-menu > li > a.active {
        background: var(--light);
        color: var(--primary);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        background: var(--light);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .price-current {
        font-size: 18px;
    }
    
    .btn-add-cart {
        font-size: 13px;
        padding: 8px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .article-image {
        height: 180px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .section-title {
        font-size: 24px;
        padding: 0 10px;
    }
    
    .section-subtitle {
        font-size: 16px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 18px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card {
        max-width: 100%;
        margin: 0;
    }
    
    .header-actions a,
    .header-actions button {
        font-size: 14px;
        padding: 8px 12px;
    }
}


