/* SBuilder Shop - Main Stylesheet */
:root {
    --primary-color: #e74c3c;
    --secondary-color: #34495e;
    --accent-color: #f39c12;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --max-width: 1200px;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--dark-color);
    color: #fff;
    padding: 8px 0;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    margin-right: 5px;
}

.user-menu a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.3s;
}

.user-menu a:hover {
    color: var(--accent-color);
}

.header-main {
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.logo span {
    color: var(--secondary-color);
}

.logo p {
    font-size: 0.9rem;
    color: #666;
}

.logo a {
    text-decoration: none;
}

.search-bar {
    flex: 1;
    max-width: 500px;
}

.search-bar form {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-bar button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #c0392b;
}

.cart-info .cart-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    transition: color 0.3s;
}

.cart-info .cart-link:hover {
    color: var(--primary-color);
}

.cart-info i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Navigation */
.main-nav {
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.main-nav li {
    margin: 0 5px;
}

.main-nav a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    border-radius: var(--border-radius);
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--primary-color);
    color: #fff;
}

.main-nav .sale-link {
    background: var(--accent-color);
    color: #fff;
    font-weight: bold;
}

.main-nav .sale-link:hover {
    background: #e67e22;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.hero-features .feature {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.hero-features i {
    font-size: 1.5rem;
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 15px 40px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

/* Sections */
.sale-section,
.featured-section,
.categories-section,
.info-section {
    padding: 60px 0;
}

.sale-section {
    background: #fff5f5;
}

.featured-section {
    background: #f8f9fa;
}

.categories-section {
    background: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-header i {
    color: var(--primary-color);
    margin-right: 10px;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-card.sale {
    border: 2px solid var(--accent-color);
}

.sale-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--danger-color);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 10;
}

.product-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-image:hover img {
    transform: scale(1.05);
}

.no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    color: #999;
    font-size: 3rem;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-info h3 a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.product-info h3 a:hover {
    color: var(--primary-color);
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.add-to-cart {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #c0392b;
}

.add-to-cart i {
    margin-right: 8px;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.category-card a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-icon {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    font-size: 4rem;
    color: var(--primary-color);
}

.category-card h3 {
    padding: 20px 20px 10px;
    font-size: 1.3rem;
    color: var(--secondary-color);
}

.category-card p {
    padding: 0 20px 20px;
    color: #666;
    line-height: 1.4;
}

/* Info Section */
.info-section {
    background: var(--light-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.info-card {
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.info-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.info-card p {
    color: #666;
    line-height: 1.5;
}

/* Section Footer */
.section-footer {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.view-all-btn:hover {
    background: var(--dark-color);
    transform: translateY(-2px);
}

.view-all-btn i {
    margin-left: 8px;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-section p {
    line-height: 1.6;
    color: #bdc3c7;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--accent-color);
}

.contact-info p {
    margin-bottom: 10px;
}

.contact-info i {
    width: 20px;
    margin-right: 10px;
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.legal-links {
    margin-top: 10px;
}

.legal-links a {
    margin-right: 20px;
    font-size: 0.9rem;
}

.company-info {
    font-size: 0.9rem;
    color: #95a5a6;
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 10000;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flash-success {
    background: var(--success-color);
    color: #fff;
}

.flash-error {
    background: var(--danger-color);
    color: #fff;
}

.flash-warning {
    background: var(--warning-color);
    color: #fff;
}

.flash-info {
    background: var(--secondary-color);
    color: #fff;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-main {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-bar {
        width: 100%;
        max-width: none;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav a {
        text-align: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-top {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .flash-message {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}