/*
Theme Name: Serial Cables
Theme URI: https://serialcables.com
Author: Serial Cables
Description: Official Serial Cables WordPress theme matching serialcables.com branding
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: serialcables
*/

:root {
    --sc-primary: #6423fd;
    --sc-footer-bg: #0a0349;
    --sc-white: #ffffff;
    --sc-font-heading: 'Instrument Sans', sans-serif;
    --sc-font-body: 'Geist', sans-serif;
}

/* ===== BASE ===== */

body {
    font-family: var(--sc-font-body);
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--sc-font-heading);
}

a {
    color: var(--sc-primary);
}

a:hover {
    color: rgba(100, 35, 253, 0.8);
    text-decoration: none;
}

/* ===== NAVBAR ===== */

.navbar {
    border-bottom: 1px solid #e8e8e8;
}

.navbar-brand img {
    width: 200px;
    max-height: 200px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.navbar-nav.desk-menu > .nav-item > .nav-link {
    font-size: 12px;
    font-family: var(--sc-font-heading);
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #333;
    padding: 0.5rem 0.75rem;
}

.navbar-nav.desk-menu > .nav-item > .nav-link:hover,
.navbar-nav.desk-menu > .nav-item.current-menu-item > .nav-link,
.navbar-nav.desk-menu > .nav-item.current-menu-ancestor > .nav-link {
    color: var(--sc-primary);
}

.custom-dropdown .dropdown-menu a,
.inner-dropdown-menu a {
    font-size: 14px;
    font-family: var(--sc-font-heading);
    font-weight: 400;
    padding: 0.4rem 1.5rem;
}

.navbar-nav.desk-menu .dropdown-toggle::after,
.custom-dropdown .dropdown-toggle::after,
.inner-dropdown .dropdown-toggle::after {
    display: none;
}

.desk-menu .inner-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
}

.desk-menu .inner-dropdown .dropdown-toggle i {
    margin-left: auto;
    padding-left: 1rem;
}

.dropdown-menu {
    min-width: 206px;
    margin-top: 0;
    border-radius: 0;
    border: none;
    border-top: 3px solid var(--sc-primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dropdown-menu.inner-dropdown-menu {
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.1);
}

/* Desktop: open menus on hover and fly nested menus out to the right (as on serialcables.com) */
@media (min-width: 992px) {
    .navbar-nav.desk-menu > .nav-item > .nav-link {
        white-space: nowrap;
    }

    .navbar-nav.desk-menu .dropdown:hover > .dropdown-menu {
        display: block;
    }

    .custom-dropdown .dropdown-menu.inner-dropdown-menu {
        left: 100%;
        top: 0;
    }
}

/* Mobile: menus expand as a flat, indented list inside the slide-out panel
   (no floating box, border or shadow), chevrons right after the label pointing down */
@media (max-width: 991px) {
    .navbar-nav.desk-menu .dropdown-menu {
        position: static;
        float: none;
        min-width: 0;
        margin: 0;
        padding: 0 0 8px 20px;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .navbar-nav.desk-menu .dropdown-menu .dropdown-item {
        font-size: 13px;
        padding: 8px 20px 8px 4px;
        white-space: normal;
    }

    .custom-dropdown .dropdown-menu.inner-dropdown-menu {
        margin-left: 15px;
        padding-bottom: 4px;
    }

    .desk-menu .inner-dropdown .dropdown-toggle {
        display: inline-flex;
    }

    .desk-menu .inner-dropdown .dropdown-toggle i {
        margin-left: 5px;
        padding-left: 0;
        transform: rotate(90deg);
    }
}

.custom-dropdown ul li {
    line-height: 1.5;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #fafafa;
    color: #000;
}

.dropdown-item:active {
    background-color: var(--sc-primary);
    color: #fff;
}

/* ===== SEARCH ===== */

.primary_border {
    border-color: var(--sc-primary) !important;
}

#searchGroup {
    position: relative;
}

#searchToggler {
    cursor: pointer;
    padding: 0 10px;
    color: #333;
    font-size: 1rem;
}

#searchToggler:hover {
    color: var(--sc-primary);
}

#collapseSearch {
    display: none;
    border: 1px solid var(--sc-primary);
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    z-index: 1000;
    min-width: 280px;
}

#collapseSearch.show {
    display: block;
}

#collapseSearch .search-form {
    display: flex;
    margin: 0;
}

#collapseSearch .search-field {
    flex: 1;
    border: none;
    padding: 8px 12px;
    outline: none;
    font-size: 14px;
}

#collapseSearch .search-submit {
    background-color: var(--sc-primary);
    color: #fff;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
}

#collapseSearch .search-submit:hover {
    background-color: rgba(100, 35, 253, 0.9);
}

/* ===== RIGHT HEADER MENU ===== */

.green-menus {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.green-menus > li {
    margin-left: 12px;
}

.header_my_account_menu > a,
.cart_top_display {
    color: #333;
    font-size: 14px;
    font-family: var(--sc-font-heading);
    font-weight: 600;
}

.header_my_account_menu > a:hover,
.cart_top_display:hover {
    color: var(--sc-primary);
    text-decoration: none;
}

.cart_top_display {
    position: relative;
    font-size: 1.1rem;
}

.cart_top_display .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    font-size: 0.6rem;
    padding: 2px 5px;
    background-color: var(--sc-primary) !important;
}

.navbar-toggler {
    border: none;
    padding: 0;
}

/* ===== BUTTONS ===== */

.btn.theme-primary {
    background-color: var(--sc-primary) !important;
    border-color: var(--sc-primary) !important;
    color: #ffffff !important;
}

.btn.theme-primary:hover,
.btn.theme-primary:focus,
.btn.theme-primary:active {
    background-color: rgba(100, 35, 253, 0.9) !important;
    color: #ffffff !important;
}

/* ===== MAIN CONTENT ===== */

.card-img-top {
    height: 220px;
    object-fit: contain;
    background-color: #fff;
}

.site-content {
    min-height: 60vh;
    padding: 40px 0;
}

.site-content--grey {
    background-color: #eeeeee;
}

.page-title {
    margin: 0 0 30px;
    font-family: var(--sc-font-heading);
    font-weight: 400;
    font-size: 34px;
    color: #222;
}

.entry-content table {
    background-color: #fff;
}

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

.entry-content .faq-card {
    background-color: #fff;
}

.blog-content-card {
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 32px;
}

@media (max-width: 767px) {
    .blog-content-card {
        padding: 20px;
    }
}

/* ===== FOOTER ===== */

#widget-footer {
    background: var(--sc-footer-bg);
}

.top-footer {
    background: var(--sc-footer-bg);
    padding-top: 60px;
    padding-bottom: 40px;
}

.top-footer h4 {
    color: var(--sc-white);
    font-family: var(--sc-font-heading);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.top-footer p,
.top-footer p a {
    color: var(--sc-white);
    font-size: 14px;
    line-height: 1.8;
}

.top-footer p a:hover {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.footer-image-type img {
    max-width: 180px;
    margin-bottom: 20px;
}

.footer_menu {
    padding-left: 0;
    margin: 0;
}

.footer_menu li {
    list-style: none;
}

.footer_menu li a {
    color: var(--sc-white) !important;
    font-size: 14px !important;
    line-height: 2;
    text-decoration: none;
    font-family: var(--sc-font-body);
}

.footer_menu li a:hover {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
}

.copyright-footer {
    background-color: var(--sc-primary);
    padding: 20px 0;
}

.footer-copyright-text {
    color: var(--sc-white) !important;
    margin: 0;
    font-size: 14px;
    font-family: var(--sc-font-body);
}

/* ===== RESPONSIVE ===== */

.close-nav {
    display: none;
}

@media (max-width: 991px) {
    .close-nav {
        display: block;
        text-align: right;
        padding: 15px;
        cursor: pointer;
        border-bottom: 1px solid #f0f0f0;
    }

    #nav-collapse {
        position: fixed;
        top: 0;
        left: -290px;
        width: 290px;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
        padding-bottom: 30px;
    }

    #nav-collapse.open {
        left: 0;
    }

    .navbar-nav.desk-menu {
        flex-direction: column;
    }

    .navbar-nav.desk-menu > .nav-item > .nav-link {
        padding: 12px 20px;
        border-bottom: 1px solid #f5f5f5;
        display: block;
    }

    .navbar-brand img {
        width: 150px;
        padding-top: 15px;
        padding-bottom: 15px;
    }
}

/* ===== CONTACT LANDING TEMPLATE ===== */

/* Unified white panel containing the intro column and the form */
.custom-landing .contact-panel {
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 56px;
    margin-bottom: 40px;
    border-radius: 0;
}

/* Left column: page title */
.custom-landing .contact-panel__title {
    margin: 0 0 20px;
    font-family: var(--sc-font-heading);
    font-weight: 600;
    font-size: 40px;
    line-height: 1.15;
    color: #222;
}

/* Left column: optional excerpt as intro copy */
.custom-landing .contact-panel__intro {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    margin: 0 0 32px;
    max-width: 34ch;
}

/* Left column: contact detail icon rows */
.custom-landing .contact-details {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-landing .contact-details li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.custom-landing .contact-details li:last-child {
    margin-bottom: 0;
}

.custom-landing .contact-details__icon {
    flex: 0 0 auto;
    width: 20px;
    text-align: center;
    color: var(--sc-primary);
    font-size: 16px;
    line-height: 1.6;
}

.custom-landing .contact-details__text {
    display: block;
}

/* Small caption label above each contact detail value */
.custom-landing .contact-details li .contact-details__label {
    display: block;
    font-family: var(--sc-font-heading);
    font-weight: 700;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 2px;
}

.custom-landing .contact-details li a,
.custom-landing .contact-details li span {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.custom-landing .contact-details li a {
    color: var(--sc-primary);
    text-decoration: none;
}

.custom-landing .contact-details li a:hover {
    color: rgba(100, 35, 253, 0.8);
}

/* Right column: Contact Form 7 output */
.custom-landing .contact-panel__form {
    width: 100%;
}

.custom-landing .contact-panel__form label {
    display: block;
    font-family: var(--sc-font-body);
    font-weight: 500;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}

.custom-landing .contact-panel__form input[type="text"],
.custom-landing .contact-panel__form input[type="email"],
.custom-landing .contact-panel__form input[type="tel"],
.custom-landing .contact-panel__form input[type="url"],
.custom-landing .contact-panel__form input[type="number"],
.custom-landing .contact-panel__form select,
.custom-landing .contact-panel__form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 0;
    padding: 12px 14px;
    font-family: var(--sc-font-body);
    font-size: 15px;
    color: #333;
    background-color: #fff;
    margin-bottom: 16px;
}

.custom-landing .contact-panel__form input[type="text"]:focus,
.custom-landing .contact-panel__form input[type="email"]:focus,
.custom-landing .contact-panel__form input[type="tel"]:focus,
.custom-landing .contact-panel__form input[type="url"]:focus,
.custom-landing .contact-panel__form input[type="number"]:focus,
.custom-landing .contact-panel__form select:focus,
.custom-landing .contact-panel__form textarea:focus {
    border-color: var(--sc-primary);
    outline: 1px solid var(--sc-primary);
    outline-offset: 0;
}

.custom-landing .contact-panel__form input[type="submit"] {
    background-color: var(--sc-primary);
    border: none;
    border-radius: 0;
    color: #fff;
    font-family: var(--sc-font-heading);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 28px;
    cursor: pointer;
}

.custom-landing .contact-panel__form input[type="submit"]:hover {
    background-color: rgba(100, 35, 253, 0.9);
}

/* CF7 validation and response messages */
.custom-landing .contact-panel__form .wpcf7-not-valid-tip {
    font-size: 13px;
    color: #d9534f;
    margin-top: -10px;
    margin-bottom: 12px;
}

.custom-landing .contact-panel__form .wpcf7-response-output {
    border: 1px solid var(--sc-primary);
    border-radius: 0;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    margin: 16px 0 0;
}

/* ===== CUSTOM DESIGN REQUEST TEMPLATE ===== */

/* Left column: request copy paragraphs */
.custom-landing .contact-panel__copy p {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    margin: 0 0 18px;
    max-width: 46ch;
}

.custom-landing .contact-panel__copy p:last-child {
    margin-bottom: 0;
}

/* Left column: inline "Prefer to talk it through?" links */
.custom-landing .contact-panel__cta {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin: 48px 0 0;
}

.custom-landing .contact-panel__cta a {
    color: var(--sc-primary);
    text-decoration: none;
    margin-left: 6px;
}

.custom-landing .contact-panel__cta a:hover {
    color: rgba(100, 35, 253, 0.8);
}

/* Responsive adjustments for the contact panel */
@media (max-width: 991px) {
    .custom-landing .contact-panel {
        padding: 24px;
    }

    .custom-landing .contact-panel__info {
        margin-bottom: 32px;
    }

    .custom-landing .contact-panel__title {
        font-size: 30px;
    }
}
