/*
Theme Name: M-R Machinery
Theme URI: https://m-rmachinery.com
Description: Custom theme for M-R Machinery Sales, Inc. - Industrial Equipment
Author: M-R Machinery Dev Team
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: mr-machinery

WooCommerce support included.
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

a {
    color: #c0392b;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #e74c3c;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== FULL-WIDTH LAYOUT ===== */
.site-content,
.site-header,
.site-footer,
.woocommerce {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo img {
    max-height: 80px;
    width: auto;
}

.header-info {
    text-align: right;
}

.header-info .company-name {
    font-size: 28px;
    font-weight: 900;
    color: #000;
    letter-spacing: -0.5px;
}

.header-info .company-domain {
    font-size: 16px;
    color: #555;
}

.header-info .company-phone {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.header-tagline {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    text-align: center;
    padding: 8px 20px;
    font-size: 18px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.5px;
}

.header-address {
    background: #f8f8f8;
    text-align: center;
    padding: 6px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
}

/* ===== NAVIGATION ===== */
.main-nav {
    background: linear-gradient(135deg, #1a5e1a, #2d8e2d);
    padding: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 12px 24px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255,255,255,0.15);
    transition: background 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.main-nav li:first-child a { border-left: 1px solid rgba(255,255,255,0.15); }

/* ===== HERO / HOME ===== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    text-align: center;
    padding: 60px 30px;
}

.hero-section h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-section p {
    font-size: 18px;
    opacity: 0.9;
}

/* ===== FEATURED MACHINES ===== */
.featured-machines {
    padding: 50px 30px;
    background: #fff;
}

.featured-machines h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #1a1a2e;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.featured-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}

.featured-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

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

.featured-card .card-info {
    padding: 15px;
}

.featured-card .card-info h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1a1a2e;
}

.featured-card .card-info .inventory-num {
    font-size: 13px;
    color: #888;
}

.featured-card .card-info .card-price {
    color: #c0392b;
    font-weight: 600;
    margin-top: 8px;
}

/* ===== PRODUCT LISTING (WooCommerce Override) ===== */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    max-width: 1400px;
    margin: 0 auto !important;
    padding: 30px !important;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.woocommerce ul.products li.product img {
    border-radius: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 10px 15px 5px;
    font-size: 15px;
}

.woocommerce ul.products li.product .price {
    padding: 0 15px 10px;
    color: #c0392b;
}

/* ===== SINGLE PRODUCT ===== */
.woocommerce div.product {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

.woocommerce div.product div.images {
    width: 50% !important;
    float: left !important;
}

.woocommerce div.product div.summary {
    width: 46% !important;
    float: right !important;
}

.woocommerce div.product .product_title {
    font-size: 26px;
    color: #1a1a2e;
}

/* Image gallery arrows styling */
.woocommerce div.product div.images .flex-control-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.woocommerce div.product div.images .flex-control-thumbs li {
    width: 80px !important;
}

/* Machine specs table on product page */
.mr-machinery-details {
    margin-top: 20px;
}

.mr-specs-table {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.mr-specs-table tr:nth-child(even) {
    background: #f9f9f9;
}

.mr-specifications {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
    background: #fafafa;
}

.mr-specifications h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1a1a2e;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 8px;
}

.mr-sold-badge {
    border-radius: 6px;
    animation: pulse-sold 2s infinite;
}

@keyframes pulse-sold {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* ===== CONTACT US PAGE ===== */
.contact-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

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

.contact-top h1 {
    font-size: 32px;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.contact-details {
    font-size: 16px;
    line-height: 2;
}

.contact-details strong {
    color: #c0392b;
}

.contact-map-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.contact-map-section iframe,
.contact-map-section img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* ===== ABOUT US PAGE ===== */
.about-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 30px;
    text-align: justify;
}

.about-page h1 {
    text-align: center;
    font-size: 32px;
    color: #1a1a2e;
    margin-bottom: 30px;
}

.about-page p {
    margin-bottom: 20px;
    line-height: 1.8;
}

/* ===== FORMS (Request / Sell Equipment) ===== */
.equipment-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 30px;
}

.equipment-form h1 {
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.equipment-form .form-intro {
    color: #666;
    margin-bottom: 25px;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 15px;
    transition: border-color 0.2s;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
    border-color: #c0392b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.wpcf7 textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    resize: vertical;
    margin-bottom: 15px;
}

.wpcf7 input[type="submit"] {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wpcf7 input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(192,57,43,0.3);
}

/* ===== FOOTER ===== */
.site-footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 30px;
    text-align: center;
}

.footer-nav {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-nav a {
    color: #aaa;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-copyright {
    font-size: 13px;
    color: #777;
}

/* ===== WOOCOMMERCE NOTICES ===== */
.woocommerce-message,
.woocommerce-info {
    border-top-color: #c0392b !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: #c0392b !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
        padding: 10px 15px;
    }

    .header-info {
        text-align: center;
    }

    .header-info .company-name {
        font-size: 22px;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav a {
        text-align: center;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .hero-section h1 {
        font-size: 24px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .contact-map-section {
        grid-template-columns: 1fr;
    }

    .woocommerce div.product div.images,
    .woocommerce div.product div.summary {
        width: 100% !important;
        float: none !important;
    }
}

@media (max-width: 480px) {
    .header-tagline {
        font-size: 14px;
    }

    .main-nav a {
        padding: 10px 15px;
        font-size: 13px;
    }
}
