:root {
    --primary-color: #002147;
    --accent-color: #FFC107;
    --text-color: #333333;
    --light-gray: #f4f6f9;
    --white: #ffffff;
    --border-color: #e1e1e1;
    --font-primary: 'Montserrat', sans-serif;
    /* Headings */
    --font-secondary: 'Roboto', sans-serif;
    /* Body */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.main-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.logo h1 {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 28px;
    line-height: 1;
    color: var(--accent-color);
}

.logo h1 span {
    color: var(--white);
}

.logo small {
    display: block;
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--white);
}

.search-bar {
    flex-grow: 1;
    max-width: 600px;
    margin: 0 20px;
}

.search-wrapper {
    display: flex;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    height: 40px;
}

.category-select {
    border: none;
    background: #f8f8f8;
    padding: 0 10px;
    font-size: 13px;
    color: #666;
    border-right: 1px solid #ddd;
    outline: none;
    cursor: pointer;
}

.search-wrapper input {
    flex-grow: 1;
    border: none;
    padding: 0 15px;
    outline: none;
}

.search-wrapper button {
    background: #f8f8f8;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: background 0.2s;
}

.search-wrapper button:hover {
    background: #eee;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
}

.shipping-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.shipping-info i {
    font-size: 24px;
}

.shipping-info span {
    display: block;
    font-weight: 700;
    color: var(--white);
    /* White instead of accent for top line as per image typically */
}

.shipping-info small {
    color: #aaa;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-actions a {
    color: var(--white);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-actions .cart-btn {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 700;
}

/* Navigation */
.main-nav {
    background-color: var(--primary-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-container {
    display: flex;
    align-items: center;
    height: 50px;
}

.categories-btn {
    background: var(--white);
    color: var(--text-color);
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: 700;
    font-size: 14px;
    border-radius: 4px 4px 0 0;
    margin-right: 20px;
    gap: 10px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 25px;
    height: 100%;
}

.nav-links li a {
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #ccc;
    transition: color 0.2s;
    gap: 5px;
}

.nav-links li a:hover {
    color: var(--white);
}

/* Hero Section */
.hero-section {
    margin-top: 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    height: 450px;
}

.main-banner {
    background: #fff;
    /* Fallback */
    background: linear-gradient(90deg, #fff 40%, #f4f4f4 100%);
    border-radius: 6px;
    /* Slightly more rounded */
    padding: 40px;
    position: relative;
    display: flex;
    align-items: center;
    /* Vertically center content */
    justify-content: space-between;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 30px solid var(--primary-color);
    /* The dark blue strip on left */
}

.main-banner::before {
    content: "F A B R I C E L L";
    position: absolute;
    left: -65px;
    top: 50%;
    transform: rotate(-90deg) translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    letter-spacing: 5px;
    font-size: 12px;
    width: 200px;
    text-align: center;
}

.banner-content {
    z-index: 2;
    max-width: 50%;
}

.category-tag {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.main-banner h2 {
    font-family: var(--font-primary);
    font-size: 42px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 10px;
}

.main-banner p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

.discount-badge {
    margin-bottom: 25px;
}

.discount-badge span {
    display: block;
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 600;
    line-height: 1;
}

.discount-badge strong {
    font-size: 48px;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
    display: block;
}

.banner-image {
    position: absolute;
    right: 20px;
    bottom: 20px;
    top: 20px;
    width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #003366;
}

.btn-sm {
    padding: 6px 15px;
    font-size: 11px;
    border: 1px solid #ddd;
    color: #555;
    background: transparent;
}

.btn-sm:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Side Banners */
.side-banners {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-banner {
    flex: 1;
    background: var(--white);
    border-radius: 6px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.side-banner h3 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--accent-color);
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 5px;
}

.side-banner h3 span {
    font-size: 20px;
    color: var(--primary-color);
    font-weight: 800;
    text-transform: uppercase;
}

.side-banner p {
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
}

.side-banner img {
    max-width: 100px;
    object-fit: contain;
}

/* Benefits Bar */
.benefits-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.benefit-item {
    background: var(--white);
    padding: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    border: 1px solid #eee;
}

.benefit-item i {
    font-size: 32px;
    color: var(--primary-color);
    /* Outline style conceptually, but FA solid is easier */
    width: 60px;
    text-align: center;
}

.benefit-text strong {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.benefit-text span {
    font-size: 12px;
    color: #888;
}

/* Products Section */
.products-section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.section-header h3 {
    font-family: var(--font-primary);
    font-weight: 800;
    color: #333;
    text-transform: uppercase;
    font-size: 18px;
}

.section-tabs {
    display: flex;
    gap: 30px;
}

.section-tabs a {
    font-size: 14px;
    color: #888;
    font-weight: 500;
    padding-bottom: 10px;
    /* To overlap border if needed */
    position: relative;
}

.section-tabs a.active {
    color: var(--primary-color);
    font-weight: 700;
}

.section-tabs a.active::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
}

.section-sort {
    font-size: 12px;
    color: #666;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-brand {
    font-size: 11px;
    color: #999;
    background: #f4f4f4;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 2px;
    margin-bottom: 10px;
}

.product-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 10px;
    height: 36px;
    /* truncate effect constraint */
    overflow: hidden;
}

.product-rating {
    color: #ddd;
    font-size: 12px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

/* Responsiveness */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .main-banner {
        height: 400px;
        /* Fixed height for mobile view if stacked */
    }

    .side-banners {
        flex-direction: row;
    }

    .side-banner {
        height: 200px;
    }

    .benefits-bar {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        /* simple toggle for now */
    }

    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 15px;
    }
}

/* Product Detail Page */
.product-detail-container {
    padding-top: 40px;
    padding-bottom: 60px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.detail-image {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    /* Important for zoom */
    cursor: zoom-in;
}

.detail-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.1s ease-out;
    /* Smooth follow */
}

/* On hover, we will handle transform via JS, but we can have a default state if needed */

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-brand {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.detail-title {
    font-family: var(--font-primary);
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin-bottom: 15px;
}

.detail-rating {
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 14px;
}

.detail-rating span {
    color: #999;
    margin-left: 5px;
}

.detail-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-description {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.detail-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.quantity-selector {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 45px;
}

.quantity-selector button {
    width: 35px;
    background: #f8f8f8;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.quantity-selector input {
    width: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-weight: 600;
}

.btn-buy,
.btn-cart {
    flex: 1;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-buy {
    background-color: var(--accent-color);
    color: #333;
}

.btn-buy:hover {
    background-color: #e0a800;
}

.btn-cart {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-cart:hover {
    background-color: #003366;
}

.detail-meta {
    font-size: 13px;
    color: #777;
}

.meta-item {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-item i {
    color: var(--accent-color);
    width: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Specs Section */
.specs-section {
    margin-top: 50px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.specs-section h3 {
    margin-bottom: 20px;
    font-family: var(--font-primary);
    font-size: 20px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    font-size: 14px;
}

.specs-table th {
    width: 30%;
    background-color: #f9f9f9;
    color: #555;
    font-weight: 600;
}

.specs-table td {
    color: #333;
}

.specs-table tr:last-child th,
.specs-table tr:last-child td {
    border-bottom: none;
}

/* Related Section */
.related-section {
    margin-top: 50px;
}

.related-section h3 {
    text-align: center;
    margin-bottom: 30px;
    font-family: var(--font-primary);
    font-size: 24px;
    color: var(--primary-color);
    text-transform: uppercase;
    position: relative;
}

.related-section h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 10px auto 0;
}

/* Responsive Design (Unified for Tablets & Mobile) */
@media (max-width: 992px) {

    /* Header Layout - Stacked for better space */
    .header-container {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 10px;
    }

    .logo {
        text-align: center;
        width: 100%;
    }

    /* Force search bar to be visible and take full width */
    .search-bar {
        width: 100%;
        max-width: 100%;
        margin: 0;
        order: 2;
        /* Search bar in the middle or bottom */
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        order: 1;
        /* Icon actions below logo, above search? Or 3. Let's try 1: Logo, 2: Actions, 3: Search */
        gap: 20px;
    }

    /* Adjust search wrapper inner elements */
    .category-select {
        display: none;
        /* Hide category dropdown on mobile to save space */
    }

    .search-wrapper input {
        border-radius: 4px 0 0 4px;
        /* Fix corners if select is hidden */
    }

    /* Navigation */
    .nav-links {
        display: none;
        /* Hidden by default, toggled via JS */
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        z-index: 1000;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active li a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        height: auto;
    }

    .nav-container {
        position: relative;
        /* Context for absolute nav */
        justify-content: space-between;
    }

    .categories-btn {
        width: 100%;
        margin: 0;
        border-radius: 4px;
        justify-content: center;
    }

    /* Grid Adjustments */
    .hero-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .main-banner {
        height: auto;
        min-height: 300px;
        flex-direction: column-reverse;
        text-align: center;
        padding: 30px;
    }

    .main-banner::before {
        display: none;
    }

    .banner-content {
        max-width: 100%;
    }

    .banner-image {
        position: relative;
        width: 100%;
        height: 200px;
        right: auto;
        top: auto;
        bottom: auto;
        margin-bottom: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits-bar {
        grid-template-columns: 1fr;
    }

    .side-banners {
        flex-direction: row;
        gap: 15px;
    }

    .side-banner {
        height: auto;
        flex: 1;
    }
}

/* Mobile Specific (< 576px) extra adjustments */
@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .side-banners {
        flex-direction: column;
    }

    .shipping-info {
        display: none;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-tabs {
        width: 100%;
        justify-content: space-between;
        font-size: 13px;
        flex-wrap: wrap;
    }

    /* Specs Table */
    .specs-table,
    .specs-table tbody,
    .specs-table tr,
    .specs-table th,
    .specs-table td {
        display: block;
    }

    .specs-table th {
        width: 100%;
    }
}