/* style.css - Global Styles for CircuitSourceBD */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: #f5f7fb;
    color: #1a2c3e;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: #c8102e;
}

a:hover {
    color: #1e2a3a;
}

/* Top Bar */
.top-bar {
    background: #1e2a3a;
    color: #ccc;
    font-size: 12px;
    padding: 8px 5%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.top-bar a {
    color: #ffcd7e;
}

/* Header */
.header {
    background: white;
    padding: 15px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: #c8102e;
}

.logo span {
    color: #1e2a3a;
    font-size: 10px;
    display: block;
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 500px;
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 40px 0 0 40px;
    outline: none;
    font-size: 14px;
}

.search-bar input:focus {
    border-color: #c8102e;
}

.search-bar button {
    background: #c8102e;
    border: none;
    padding: 0 24px;
    border-radius: 0 40px 40px 0;
    color: white;
    cursor: pointer;
}

/* Header Icons */
.header-icons {
    display: flex;
    gap: 25px;
    font-size: 20px;
}

.header-icons a {
    color: #1e2a3a;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -12px;
    background: #c8102e;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

/* Navigation */
.nav {
    background: #c8102e;
    padding: 12px 5%;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    overflow-x: auto;
}

.nav a {
    color: white;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.nav a:hover {
    text-decoration: underline;
}

/* Hero Banner */
.hero {
    background: linear-gradient(135deg, #0f2b3d 0%, #1a4a5f 100%);
    color: white;
    padding: 60px 5%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.hero-content h1 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btn {
    background: #ffcd7e;
    color: #1e2a3a;
    padding: 14px 35px;
    border-radius: 40px;
    font-weight: bold;
    display: inline-block;
}

/* Section Title */
.section-title {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 5% 20px;
    border-left: 5px solid #c8102e;
    padding-left: 20px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    padding: 0 5%;
    margin-bottom: 50px;
}

.product-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: #c8102e;
}

.product-badge {
    display: inline-block;
    background: #c8102e;
    color: white;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.product-badge.new {
    background: #2e7d32;
}

.product-img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    margin-bottom: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.product-category {
    font-size: 12px;
    color: #c8102e;
    margin-bottom: 5px;
}

.product-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    height: 42px;
    overflow: hidden;
}

.product-price {
    font-size: 20px;
    font-weight: 800;
    color: #c8102e;
    margin: 10px 0;
}

.product-stock {
    font-size: 12px;
    color: #2e7d32;
    margin-bottom: 12px;
}

.product-stock.out {
    color: #c62828;
}

.btn, .btn-add, .btn-primary, .btn-secondary {
    background: #1e2a3a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: inline-block;
    text-align: center;
}

.btn-add:hover, .btn-primary:hover {
    background: #c8102e;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    border: 2px solid #c8102e;
    color: #c8102e;
}

.btn-outline:hover {
    background: #c8102e;
    color: white;
}

/* Category Icons */
.category-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px 5%;
    background: white;
    margin: 20px 0;
}

.category-icon {
    width: 80px;
    height: 80px;
    background: #f0f4f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #c8102e;
    margin-bottom: 10px;
}

.category-item {
    text-align: center;
    color: #1e2a3a;
    transition: 0.2s;
}

.category-item:hover {
    transform: translateY(-5px);
}

/* Features Banner */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 40px 5%;
    background: #1e2a3a;
    color: white;
    text-align: center;
    margin: 40px 0;
}

.feature i {
    font-size: 40px;
    color: #ffcd7e;
    margin-bottom: 15px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 5%;
    background: white;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.breadcrumb a {
    color: #c8102e;
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 5%;
    margin-bottom: 50px;
}

.product-detail-image img {
    width: 100%;
    border-radius: 16px;
}

.product-detail-info h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.product-detail-price {
    font-size: 32px;
    font-weight: 800;
    color: #c8102e;
    margin: 20px 0;
}

.product-detail-meta {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.quantity-selector input {
    width: 80px;
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Cart Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table th, .cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.cart-table th {
    background: #f8fafc;
}

.cart-summary {
    background: white;
    padding: 20px;
    border-radius: 16px;
    margin-top: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #c8102e;
}

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* Footer */
.footer {
    background: #0f1c2c;
    color: #b0c4de;
    padding: 40px 5%;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer h4 {
    color: white;
    margin-bottom: 15px;
}

.footer a {
    color: #b0c4de;
    display: block;
    margin: 8px 0;
}

.footer a:hover {
    color: #ffcd7e;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #2a3a4a;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 28px; }
    .hero-icons { display: none; }
    .header { flex-direction: column; }
    .search-bar { max-width: 100%; }
    .product-detail { grid-template-columns: 1fr; }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
        display: block;
    }
}