/* ============================================
   J&S Hardware - Exact Colors from Image
   ============================================ */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background: #f8f9fa;
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================
   TOP BAR - Exact Blue from Image
============================================ */
.top-bar {
    background: #007bff;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    padding: 6px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.top-bar span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   HEADER - Exact Colors from Image
============================================ */
.main-header {
    background: #ffffff;
    padding: 12px 0;
    border-bottom: 2px solid #007bff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
    flex-shrink: 0;
}

.logo .badge {
    background: #007bff;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
}

.logo span {
    font-size: 18px;
    font-weight: 700;
    color: #1e2a3a;
    line-height: 1.2;
}

.logo small {
    display: block;
    font-size: 9px;
    font-weight: 400;
    color: #6c757d;
    letter-spacing: 1px;
}

/* Search Form - Exact Blue from Image */
.search-form input {
    flex: 1;
    padding: 8px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    min-width: 60px;
    transition: border-color 0.3s;
}

.search-form input:focus {
    outline: none;
    border-color: #007bff;
}

.search-form button {
    padding: 8px 18px;
    background: #007bff;
    color: white;
    border: 2px solid #007bff;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-form button:hover {
    background: #0069d9;
    border-color: #0069d9;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header-actions a {
    text-decoration: none;
    color: #555;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
    padding: 4px 6px;
}

.header-actions a:hover {
    color: #007bff;
}

.cart-pill {
    background: #007bff;
    color: white !important;
    padding: 4px 14px;
    border-radius: 20px;
    transition: background 0.2s;
    font-size: 13px;
}

.cart-pill:hover {
    background: #0069d9 !important;
    color: white !important;
}

.cart-pill .count {
    background: white;
    color: #007bff;
    padding: 0 6px;
    border-radius: 10px;
    font-weight: 700;
    margin-left: 3px;
    font-size: 12px;
}

/* ============================================
   CATEGORY NAV - Exact Dark Navy from Image
============================================ */
.category-nav {
    background: #1e2a3a;
    border-bottom: none;
    position: sticky;
    top: 60px;
    z-index: 99;
}

.category-nav ul {
    list-style: none;
    display: flex;
    gap: 3px;
    padding: 6px 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav ul::-webkit-scrollbar {
    display: none;
}

.category-nav a {
    display: block;
    padding: 5px 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-nav a:hover {
    background: #007bff;
    color: white;
}

/* ============================================
   HERO - Exact Dark Navy from Image
============================================ */
.hero {
    background: linear-gradient(135deg, #1e2a3a, #2c3e50);
    color: white;
    padding: 50px 0 60px;
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 25px;
    line-height: 1.6;
}

.hero .btn {
    background: #007bff;
    color: white;
    padding: 10px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s;
    margin: 4px;
    font-size: 15px;
}

.hero .btn:hover {
    background: #0069d9;
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: transparent !important;
    color: white !important;
    border: 2px solid white !important;
}

.btn-secondary:hover {
    background: white !important;
    color: #1e2a3a !important;
}

/* ============================================
   SECTIONS
============================================ */
.section {
    padding: 40px 0;
}

.section.bg-light {
    background: #f8f9fa;
}

.section-title {
    color: #1e2a3a;
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #007bff;
    margin: 8px auto 0;
    border-radius: 2px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    color: #1e2a3a;
    font-size: 22px;
    font-weight: 700;
}

.section-header .view-all {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.section-header .view-all:hover {
    text-decoration: underline;
}

/* ============================================
   CATEGORY GRID
============================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.category-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 18px 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.category-card .icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.category-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1e2a3a;
    margin: 0;
}

/* ============================================
   PRODUCT GRID
============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
}

.product-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.product-card a {
    text-decoration: none;
    color: #333;
    display: block;
}

.product-image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-card h3 {
    font-size: 14px;
    margin-bottom: 4px;
    min-height: 36px;
    line-height: 1.3;
    color: #1e2a3a;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #1e2a3a;
    margin-bottom: 4px;
}

.product-sale {
    background: #dc3545;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    position: absolute;
    top: 8px;
    right: 8px;
}

/* ============================================
   BUTTONS - Exact Blue from Image
============================================ */
.btn {
    display: inline-block;
    padding: 8px 22px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-align: center;
}

.btn:hover {
    background: #0069d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-secondary:hover {
    background: #007bff;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 35px;
    font-size: 18px;
}

/* ============================================
   CTA SECTION - Exact Dark Navy from Image
============================================ */
.cta-section {
    background: linear-gradient(135deg, #1e2a3a, #2c3e50);
    color: white;
    padding: 50px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.cta-section p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 25px;
}

.cta-section .btn {
    background: #007bff;
    color: white;
    padding: 12px 35px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

.cta-section .btn:hover {
    background: #0069d9;
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
}

/* ============================================
   FOOTER - Exact Dark Navy from Image
============================================ */
footer {
    background: #1e2a3a;
    color: rgba(255, 255, 255, 0.8);
    padding: 35px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    padding-bottom: 25px;
}

.footer-grid h4 {
    color: white;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
}

.footer-grid li {
    margin-bottom: 6px;
    font-size: 14px;
}

.footer-grid a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-grid a:hover {
    color: #007bff;
}

.footer-grid .fab {
    font-size: 18px;
    transition: all 0.2s;
    margin-right: 8px;
}

.footer-grid .fab:hover {
    transform: translateY(-2px);
    color: #007bff;
}

.bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
============================================ */

/* Tablets and smaller */
@media (max-width: 992px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .logo span {
        font-size: 16px;
    }
    
    .search-form {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .header-actions {
        gap: 5px;
    }
    
    .header-actions a {
        font-size: 12px;
        padding: 3px 5px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Mobile Phones */
@media (max-width: 768px) {
    .top-bar {
        font-size: 11px;
        padding: 4px 0;
    }
    
    .top-bar .container {
        flex-direction: column;
        text-align: center;
        gap: 2px;
    }
    
    .top-bar span:last-child {
        font-size: 10px;
    }
    
    .main-header {
        padding: 8px 0;
        top: 0;
    }
    
    .header-inner {
        gap: 6px;
    }
    
    .logo .badge {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .logo span {
        font-size: 14px;
    }
    
    .logo small {
        font-size: 8px;
    }
    
    .search-form input {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .search-form button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .header-actions a {
        font-size: 11px;
        padding: 2px 4px;
    }
    
    .header-actions a span {
        display: none;
    }
    
    .cart-pill {
        font-size: 12px;
        padding: 3px 10px;
    }
    
    .category-nav {
        top: 54px;
    }
    
    .category-nav a {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .hero {
        padding: 30px 0 40px;
    }
    
    .hero h1 {
        font-size: 22px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .hero .btn {
        font-size: 14px;
        padding: 8px 20px;
    }
    
    .section {
        padding: 25px 0;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .section-header h2 {
        font-size: 18px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .category-card {
        padding: 12px 8px;
    }
    
    .category-card .icon {
        font-size: 24px;
    }
    
    .category-card h3 {
        font-size: 12px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        padding: 10px;
    }
    
    .product-image {
        height: 110px;
    }
    
    .product-card h3 {
        font-size: 13px;
        min-height: 32px;
    }
    
    .product-price {
        font-size: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .logo .badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .logo span {
        font-size: 12px;
    }
    
    .logo small {
        font-size: 7px;
    }
    
    .search-form input {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .search-form button {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .header-actions a {
        font-size: 10px;
    }
    
    .cart-pill {
        font-size: 11px;
        padding: 2px 8px;
    }
    
    .cart-pill .count {
        font-size: 10px;
    }
    
    .category-nav a {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .hero {
        padding: 20px 0 30px;
    }
    
    .hero h1 {
        font-size: 18px;
    }
    
    .hero p {
        font-size: 13px;
    }
    
    .hero .btn {
        font-size: 13px;
        padding: 6px 16px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .section-header h2 {
        font-size: 16px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .category-card {
        padding: 10px 6px;
    }
    
    .category-card .icon {
        font-size: 20px;
    }
    
    .category-card h3 {
        font-size: 11px;
    }
    
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .product-card {
        padding: 8px;
    }
    
    .product-image {
        height: 90px;
    }
    
    .product-card h3 {
        font-size: 12px;
        min-height: 28px;
    }
    
    .product-price {
        font-size: 14px;
    }
    
    .btn {
        font-size: 12px;
        padding: 6px 14px;
    }
    
    .btn-sm {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .no-print { display: none !important; }
    .top-bar, .category-nav, .header-actions { display: none !important; }
    body { background: white !important; }
    .hero { background: #1e2a3a !important; }
    .product-card { break-inside: avoid; }
}