/* ============================================= */
/*   Amazing Machinery - Main Stylesheet (am.css) */
/*   Updated April 2026 - Modern Red Menu Added   */
/* ============================================= */

body, html, p, li, table, div, span, a {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10pt;
}

body { margin: 0em; }

/* Basic link colors */
a:link, a:visited { color: #FF0000; }
a:hover { color: #000000; }
a:active { color: #FF0000; }

/* ====================== Common Content Styles ====================== */
.am, .body, .textleft10 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt;
    color: #000000;
    line-height: 19px;
    text-align: left;
}
.textcent10 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt;
    color: #000000;
    line-height: 19px;
    text-align: center;
}
.navmenutitle {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10pt;
	font-style: normal;
	line-height: 22px;
	font-weight: bold;
	color: #000000;
	
}
.ambold { font-weight: bold; }

.textleft10bold { font-weight: bold; }

.pagetitle, h2, .price, .price18, h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-align: center;
    color: #FF0000;
}

.pagetitle { font-size: 12pt; }
h2 { font-size: 16pt; margin: 10px 0; }
.price, .price18 { font-size: 14pt; }
.price18 { font-size: 18pt; }
h1 { font-size: 20pt; }

.pagetitlebigger {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-align: center;
    color: #000000; font-size: 14pt; }

.pagetitleleft {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-align: left;
    color: #000000; font-size: 14pt; }

.green { color: #048552; }
.textleftred { color: #FF0000; font-weight: bold; }
.textleftred-normal { color: #FF0000; }
.textleftgreen { color: #21A542; font-weight: bold; }
.textstrikethru { text-decoration: line-through; }
.textcenteredred2 {
    color: #FF0000;
    font-weight: bold;
    text-align: center;
    line-height: 1.6;     /* Increased line spacing */
}
/* Table borders */
.tableborder { border: 2px solid black; padding: 4px; }
.tableborder2 { border: 2px solid white; padding: 4px; }

/* Image list hover effect */
ul.img-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
}
ul.img-list li {
    display: inline-block;
    height: 150px;
    margin: 0 1em 1em 0;
    position: relative;
    width: 420px;
}
span.text-content {
    background: rgba(0,0,0,0.5);
    color: white;
    cursor: pointer;
    display: table;
    height: 150px;
    left: 0;
    position: absolute;
    top: 0;
    width: 300px;
    opacity: 0;
    transition: opacity 500ms;
}
ul.img-list li:hover span.text-content {
    opacity: 1;
}
span.text-content span {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}

.table-cell { position: relative; }

/* ====================== MODERN RED MENU + SEARCH ====================== */
.main-nav {
    display: flex;
    align-items: center;
    background: #FF0000;
    border-bottom: 2px solid #000;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 0 8px;                  /* slightly reduced */
    overflow: visible;
    position: relative;
    z-index: 1000;
}

.nav-menu {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    gap: 4px;
    list-style: none;
}

/* Menu items */
.nav-menu li {
    position: relative;
    border: 2px solid #000000;
}

/* Main links */
.nav-menu a {
    color: #FFFFFF;
    text-decoration: none;
    padding: 10px 18px;
    display: block;
    font-size: 15px;
    font-weight: bold;
    white-space: nowrap;
}

.nav-menu a:hover {
    background: #FFFFFF;
    color: #FF0000;
}

/* ==================== DROPDOWN ==================== */
.has-dropdown {
    position: relative;               /* Very important */
}

.has-dropdown > .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #FF0000;
    min-width: 280px;
    z-index: 2000;
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
    border: 2px solid #000000;
    padding: 0;
    margin: 0;
    list-style: none;
    width: auto;
}

/* This is the key rule that often fixes flex dropdowns */
.has-dropdown:hover > .dropdown {
    display: block !important;
}

/* Dropdown items */
.dropdown li {
    border-bottom: 2px solid #000000;
}

.dropdown li:last-child {
    border-bottom: none;
}

.dropdown li a {
    padding: 9px 18px;
    display: block;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: normal;
    line-height: 1.4;
    white-space: normal;
}

.dropdown li a:hover {
    background: #FFFFFF;
    color: #FF0000;
}

/* ====================== SEARCH SECTION (FIXED) ====================== */
.menu-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    flex-shrink: 1;           /* allow it to shrink more */
    min-width: 260px;         /* reduced so it fits better */
    max-width: 380px;         /* hard cap */
}

.search-label {
    color: #FFFFFF;
    font-weight: bold;
    font-size: 15px;
    white-space: nowrap;
}

.menu-search .addsearch-container {
    background: #FFFFFF;
    border: 2px solid #000000;
    border-radius: 4px;
    flex: 1 1 auto;           /* grow but respect limits */
    max-width: 100%;
    min-width: 180px;
}

.menu-search input[type="text"] {
    border: none;
    outline: none;
    font-size: 15px;
    width: 100%;
    padding: 6px 8px;
    box-sizing: border-box;
}

/* Stronger table constraint */
table[width="1024"] td[colspan="2"] {
    padding: 0 !important;
    width: 1024px;
    max-width: 1024px;
}

/* ====================== MOBILE ====================== */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        padding: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .nav-menu li {
        border-left: none;
        border-right: none;
        width: 100%;
    }
    
    .menu-search {
        margin-left: 0;
        padding: 10px 12px 12px;
        width: 100%;
        border-top: 2px solid #000;
    }
}