/* ===============================
   GT Used Parts Marketplace Theme
   Main Stylesheet
   =============================== */

/* Reset / Base */
body.gtupm {
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: #222;
    font-family: Arial, sans-serif;
}

/* ===============================
   HEADER
   =============================== */
.gtupm-site-header {
    background: #111;
    color: #fff;
    padding: 15px 20px;
}

.gtupm-header-inner {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gtupm-site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gtupm-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    text-decoration: none;
}

.gtupm-logo-mark {
    background: #f1c40f;
    color: black;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* ===============================
   NAVIGATION
   =============================== */
.gtupm-primary-nav .gtupm-menu {
    display: flex !important;
    list-style: none !important;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.gtupm-primary-nav .gtupm-menu a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

/* ===============================
   HEADER ACTIONS
   =============================== */
.gtupm-header-actions a {
    margin-left: 15px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

/* ===============================
   MAIN PAGE WRAPPER
   =============================== */
.gtupm-site-main {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* ===============================
   HERO SEARCH SECTION
   =============================== */
.gtupm-hero {
    background: #222;
    color: #fff;
    padding: 50px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 40px;
}

.gtupm-hero h1 {
    font-size: 34px;
    margin-bottom: 12px;
}

.gtupm-search-box {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.gtupm-search-box select,
.gtupm-search-box input,
.gtupm-search-box button {
    padding: 12px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.gtupm-search-box button {
    background: #f1c40f;
    color: black;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

/* ===============================
   PRODUCT GRID
   =============================== */

ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px !important;
}

ul.products li.product {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* ===============================
   SINGLE PRODUCT TEMPLATE
   =============================== */

.gtupm-product-wrapper {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.gtupm-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.gtupm-product-info ul {
    list-style: none;
    padding: 0;
}

.gtupm-product-info li {
    padding: 4px 0;
    border-bottom: 1px solid #ddd;
}

.gtupm-price {
    font-size: 28px;
    font-weight: bold;
    margin-top: 20px;
}

/* ===============================
   FOOTER
   =============================== */
.gtupm-footer {
    background: #111;
    color: #bbb;
    padding: 40px 20px;
    margin-top: 40px;
    text-align: center;
}

.gtupm-footer a {
    color: #f1c40f;
}
/* ===== Add Used Part Page Styling ===== */

.gtupm-add-part-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.gtupm-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.gtupm-description {
    font-size: 16px;
    margin-bottom: 25px;
    color: #444;
}

.gtupm-section-title {
    font-size: 22px;
    font-weight: 600;
    margin: 30px 0 15px;
}

/* Form box */
.gtupm-add-part-form {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.05);
}

/* Grid layout */
.gtupm-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.gtupm-field {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.gtupm-field.wide {
    flex-basis: 100%;
}

.gtupm-field label {
    font-weight: 600;
    margin-bottom: 6px;
}

/* Inputs */
.gtupm-field input,
.gtupm-field select {
    padding: 10px 12px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 15px;
    background: #fafafa;
}

.gtupm-field input:focus,
.gtupm-field select:focus {
    outline: none;
    border-color: #d4a017;
    box-shadow: 0 0 4px rgba(212,160,23,0.6);
}

/* File input */
input[type=file] {
    background: #f4f4f4;
    padding: 10px;
    border-radius: 6px;
}

/* Submit Button */
.gtupm-submit-btn {
    background: #d4a017;
    color: #000;
    padding: 12px 22px;
    font-size: 17px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.25s;
    margin-top: 10px;
}

.gtupm-submit-btn:hover {
    background: #f1c40f;
}
/* ===== Product Grid Fix ===== */
ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    padding: 0;
    list-style: none;
}

/* ===== Product Card ===== */
ul.products li.product {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: 1px solid #ddd;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

ul.products li.product:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
}

/* ===== Product Image ===== */
ul.products li.product img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* ===== Product Title ===== */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    padding: 12px 15px;
    margin: 0;
    min-height: 65px;
}

/* ===== Price ===== */
ul.products li.product .price {
    padding: 0 15px 10px 15px;
    font-size: 17px;
    font-weight: bold;
    color: #000;
}

/* ===== Add to Cart Button ===== */
ul.products li.product a.button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 0;
    background: #d4a017;
    color: #000;
    font-weight: 700;
    border-radius: 0;
    margin: 0;
    transition: background 0.2s ease;
}

ul.products li.product a.button:hover {
    background: #f1c40f;
}
/* FORCE WooCommerce product grid */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 30px !important;
    padding: 20px 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* Make product cards fill the grid width */
ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 280px !important;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    transition: 0.2s ease;
}

/* Fix image */
ul.products li.product img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover;
    display: block;
}

/* Title */
ul.products li.product .woocommerce-loop-product__title {
    padding: 12px 15px;
    font-size: 18px;
    line-height: 1.2;
    min-height: 60px;
    margin: 0;
}

/* Price */
ul.products li.product .price {
    padding: 0 15px 12px 15px;
    font-size: 17px;
    font-weight: bold;
    color: #000;
}

/* Add to Cart Button */
ul.products li.product a.button {
    margin-top: auto;
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 0;
    font-size: 16px;
    background: #d4a017;
    color: #000;
    border-radius: 0;
    font-weight: 600;
}

ul.products li.product a.button:hover {
    background: #f1c40f;
}
