/* Global Styles */
:root {
    --primary-color: #0056b3;
    /* Industrial Blue - Classic */
    --secondary-color: #cc0000;
    /* Standard Red */
    --text-color: #222;
    --light-gray: #f8f8f8;
    --border-color: #ccc;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE10+/Edge */
    user-select: none;
    /* Standard */
}

/* Allow selection in inputs and textareas for usability */
input,
textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

/* Top Bar */
.top-bar {
    background-color: #f8f8f8;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    font-size: 0.9rem;
    color: #666;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.top-info i {
    color: var(--secondary-color);
    margin-right: 5px;
}

.top-social a {
    margin-left: 10px;
    color: #666;
}

/* Header */
.main-header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.search-bar {
    flex: 1;
    margin: 0 40px;
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--primary-color);
    border-radius: 2px 0 0 2px;
    outline: none;
}

.search-bar button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 2px 2px 0;
    cursor: pointer;
}

.btn-quote {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 2px;
    font-weight: 500;
}

/* Navigation */
.main-nav {
    background-color: #333;
    color: var(--white);
}

.nav-links {
    display: flex;
}

.nav-links li a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    transition: background 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
    background-color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://placehold.co/1920x600?text=Industrial+Automation');
    /* Placeholder Hero Image */
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 35px;
    border-radius: 2px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: #004494;
}

/* Categories */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    color: #333;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

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

.category-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.3s;
    border-radius: 0;
}

.category-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-card img {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 1.1rem;
    color: #333;
}

/* Footer */
.main-footer {
    background-color: #222;
    color: #ccc;
    padding: 60px 0 20px;
}

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

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.9rem;
}

/* Feature Grid (New Section) */
.section-heading {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.feature-item {
    background: #fdfdfd;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.feature-item h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-item p {
    color: #666;
    font-size: 0.95rem;
}

.bg-light {
    background-color: #f9f9f9;
}


/* Page Titles */
.page-title-bar {
    background-color: #f4f4f4;
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.page-title-bar h1 {
    font-size: 2rem;
    color: var(--primary-color);
}

.page-title-bar p {
    color: #777;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* About Page */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.about-text h2 {
    color: #333;
    margin-bottom: 20px;
}

.about-text h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #444;
}

.feature-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.feature-list li i {
    color: var(--primary-color);
    margin-right: 10px;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.brands-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.brand-item {
    padding: 20px 40px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-weight: bold;
    color: #555;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Contact Page */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

.info-item {
    display: flex;
    margin-bottom: 30px;
}

.info-item i {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    /* Centering the icon */
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 20px;
}

.contact-form-container {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

/* Products Layout */
.page-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
}

.sidebar-widget {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

.sidebar-widget h3 {
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    display: inline-block;
}

.sidebar-widget ul li {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.sidebar-widget ul li:last-child {
    border-bottom: none;
}

.product-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.product-item {
    border: 1px solid #eee;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
    border-color: transparent;
}

.product-img {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    position: relative;
    /* Added for watermark positioning */
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 10px;
    margin: auto;
    /* Extra insurance for centering */
}

.product-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    /* Fallback height */
}

.product-info p {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-sm {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 2px;
    font-size: 0.85rem;
}

.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    margin: 0 5px;
    border-radius: 2px;
}

.pagination a.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}


/* Product Detail Page */
.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr;
    }
}

.product-gallery {
    border: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    border-radius: 4px;
}

.product-gallery img {
    max-width: 100%;
}

.product-summary h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.product-summary .brand,
.product-summary .sku {
    color: #666;
    margin-bottom: 10px;
}

.price-box {
    margin: 20px 0;
    font-size: 1.2rem;
}

.status.in-stock {
    color: green;
    font-weight: bold;
}

.short-desc {
    margin-bottom: 30px;
    color: #555;
    line-height: 1.7;
}

.actions {
    display: flex;
    gap: 15px;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background-color: #666;
    color: var(--white);
    border-radius: 4px;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #555;
}

/* Tabs */
.tab-headers {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-headers button {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.tab-headers button.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}

.tab-content {
    color: #555;
    line-height: 1.8;
}


/* Factsheet Table */
.factsheet-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95rem;
}

.factsheet-table td {
    border: 1px solid var(--border-color);
    padding: 10px 15px;
}

.factsheet-table tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.factsheet-table strong {
    color: #333;
}


/* About Page Extra Sections */
.mt-4 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.about-image-col img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .grid-2-col {
        grid-template-columns: 1fr;
    }
}

.info-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.info-box h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.info-box h3 i {
    margin-right: 10px;
}

.info-box ul {
    padding-left: 20px;
}

.info-box ul li {
    list-style-type: disc;
    margin-bottom: 8px;
    color: #555;
}

.check-list li {
    list-style: none !important;
    position: relative;
    padding-left: 25px;
}

.check-list li::before {
    content: '\2713';
    /* Checkmark */
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.payment-shipment {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 30px;
}

.payment-shipment h3 {
    margin-bottom: 20px;
    color: #333;
}

.payment-shipment h4 {
    color: #555;
    margin-bottom: 5px;
}