/* ===========================================================================
   domain_phdesign — buscador de dominios al estilo phdesign.
   IMPORTANTE: se conservan TODAS las clases que usa domains.js + handlebars
   (.result-row, .result-button, .domain-register, etc.). Solo cambia la
   APARIENCIA, nunca los nombres/estructura, para no romper la búsqueda en vivo.
   Paleta phdesign: premium-600 #dc2626 (rojo), grises Tailwind.
   =========================================================================== */

.mode { display: none; }
.transfer .mode-transfer { display: initial; }
.register .mode-register { display: initial; }

#orderpage {
    font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: transparent;
    color: #374151;
    padding-bottom: 24px;
}

/* ===== Hero / buscador ===== */
#orderpage .domain-header {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    box-sizing: border-box;
    padding: 22px 24px;
    margin-bottom: 20px;
}
#orderpage .domain-search {
    margin: auto;
    width: 100%;
    max-width: 760px;
}
#orderpage .domain-search h1 {
    color: #111827;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px;
}
#orderpage .domain-input {
    position: relative;
    display: flex;
    gap: 10px;
    font-size: 16px;
    width: 100%;
    margin: 0 0 14px;
}
#orderpage .domain-textarea {
    overflow: hidden;
    flex: 1;
}
#orderpage .domain-textarea textarea {
    resize: none;
    width: 100%;
    line-height: 26px;
    padding: 10px 14px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    margin: 0;
    font-size: 15px;
    color: #111827;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
#orderpage .domain-textarea textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.15);
}
#orderpage .domain-input button {
    line-height: 24px;
    padding: 10px 28px;
    background: #dc2626;
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    align-self: flex-start;
}
#orderpage .domain-input button:hover { background: #b91c1c; }

#orderpage .domain-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
}
#orderpage .domain-modes a {
    color: #6b7280;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s;
}
#orderpage .domain-modes a:hover { color: #dc2626; text-decoration: none; }

/* ===== Resultados ===== */
#orderpage .domain-search-results { margin: 0 0 24px 0; }
#orderpage .result-group {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 22px;
    max-height: 40vh;
    overflow: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
#orderpage .result-group * { box-sizing: border-box; }
#orderpage .result-query {
    padding: 10px 16px;
    background: #f9fafb;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}
#orderpage .result-query-text { color: #111827; }
#orderpage .result-row {
    clear: both;
    margin: 0;
    padding: 10px 16px;
    background: #fff;
    line-height: 20px;
    border-bottom: 1px solid #f3f4f6;
}
#orderpage .result-row:hover { background: #f9fafb; }
#orderpage .result-row::after, #orderpage .result-row::before { content: ""; display: table; clear: both; }

#orderpage .result-data, #orderpage .result-actions { display: block; float: left; }
#orderpage .result-actions { width: 32%; text-align: right; padding: 0 4px; }
#orderpage .result-data { width: 68%; padding: 6px; }

#orderpage .result-hostname { float: left; white-space: nowrap; width: 70%; font-weight: 600; color: #111827; }
#orderpage .result-whois-link { float: right; width: 0; direction: rtl; color: #9ca3af; font-size: 80%; }
#orderpage .result-tld { font-weight: 700; margin-left: -3px; color: #dc2626; }
#orderpage .result-sld { display: none; }

#orderpage .result-price { float: right; text-align: right; width: calc(30% - 5px); color: #374151; }
#orderpage .result-price.empty { width: calc(30% + 8px); margin-left: -8px; }
#orderpage .price-amount { font-weight: 700; color: #111827; }
#orderpage .price-period { font-size: 88%; color: #9ca3af; }

#orderpage .result-button {
    display: inline-block;
    padding: 7px 16px;
    color: #374151;
    background: #f3f4f6;
    box-shadow: none;
    text-shadow: none;
    border-radius: 8px;
    height: 34px;
    line-height: 20px;
    vertical-align: middle;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-width: 104px;
    text-align: center;
    box-sizing: border-box;
    transition: background .15s, opacity .15s;
}
#orderpage .result-button:hover { text-decoration: none; filter: brightness(0.96); }
#orderpage .result-button.domain-loading { background: #f3f4f6 url(../img/loader.gif) no-repeat center center; }
#orderpage .result-button.domain-register { color: #fff; background-color: #dc2626; }
#orderpage .result-button.domain-register:hover { background-color: #b91c1c; }
#orderpage .result-button.domain-transfer { color: #fff; background-color: #f59e0b; }
#orderpage .result-button.domain-transfer:hover { background-color: #d97706; }
#orderpage .result-button.domain-noaction { color: #9ca3af; background: #f3f4f6; cursor: default; }

#orderpage .result-remove { color: #dc2626; font-size: 80%; margin: 0 10px; }
#orderpage .result-cart { background: #16a34a; color: #fff; min-width: 0; }
#orderpage .result-cart:hover { background: #15803d; }
#orderpage .result-cart.disabled { opacity: .5; }

/* ===== Barra "ordenar dominios seleccionados" ===== */
#orderpage .domain-order {
    background: #fff;
    text-align: center;
    margin: 0 0 24px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
#orderpage .domain-order .result-button {
    line-height: 24px;
    font-size: 15px;
    padding: 10px 24px;
    height: auto;
    background: #16a34a;
    color: #fff;
}
#orderpage .domain-order .result-button:hover { background: #15803d; }
#orderpage .domain-order .cart-order-txt { margin-left: 10px; }

/* ===== Tabla de precios ===== */
#orderpage .domain-price { margin: 24px 0; font-size: 14px; }
#orderpage .price-view {
    max-height: 34vh; overflow: auto;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
}
#orderpage .price-row { padding: 8px 0; background: #fff; }
#orderpage .price-row::after { content: ""; display: table; clear: both; }
#orderpage .price-row > div { float: left; width: 33%; padding: 0 16px; box-sizing: border-box; }
#orderpage .price-row:nth-child(2n) { background: #f9fafb; }
#orderpage .domain-price .price-head {
    color: #6b7280; background: #f9fafb; font-weight: 600;
    text-transform: uppercase; font-size: 12px; letter-spacing: .4px;
}
#orderpage .price-tld { font-weight: 700; color: #111827; }

/* ===== Spotlight / destacados ===== */
#orderpage .domain-spotlight { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 16px; margin: 24px 0; }
#orderpage .spotlight-product {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow: hidden;
    flex-grow: 1; min-width: 150px;
}
#orderpage .spotlight-name { text-align: center; padding: 24px 12px; font-size: 18px; font-weight: 700; color: #111827; }
#orderpage .spotlight-footer { background: #dc2626; color: #fff; padding: 14px 24px; text-align: center; }

/* ===== Descripción / slogan ===== */
#orderpage .domain-description { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 24px; margin: 24px 0; }
#orderpage .description-container { flex-basis: calc(25% - 24px); flex-grow: 1; box-sizing: border-box; }
#orderpage .description-header { font: 20px/26px -apple-system, 'Segoe UI', sans-serif; font-weight: 700; text-align: center; color: #111827; }
#orderpage .description-text { margin: 10px 0; color: #6b7280; }

/* ===== Lógica show/hide (min/mid/max) y estados (.active) — NO TOCAR ===== */
#orderpage .min, #orderpage .mid, #orderpage .max { display: none; }
@media (min-width: 980px) { #orderpage .max { display: inline; } }

#orderpage .active .result-button { display: none; }
#orderpage .result-incart { display: none; }
#orderpage .active .result-incart, #orderpage .active .result-cart { display: inline-block; }

/* ===== Responsive ===== */
@media (max-width: 979px) {
    #orderpage .domain-header { padding: 24px 16px; }
    #orderpage .domain-input { flex-direction: column; }
    #orderpage .domain-input button { width: 100%; align-self: stretch; }
    #orderpage .result-row { padding: 0; margin: 10px; border: 1px solid #e5e7eb; border-radius: 10px; }
    #orderpage .result-actions, #orderpage .result-data, #orderpage .result-data > div,
    #orderpage .result-actions .result-button, #orderpage .result-hostname,
    #orderpage .result-price, #orderpage .active .result-incart {
        width: 100%; margin: 0; border-radius: 0; text-align: center; float: none; display: block; line-height: 26px;
    }
    #orderpage .result-button { width: 100%; }
    #orderpage .result-data { min-height: 52px; border-radius: 10px 10px 0 0; padding: 10px; }
    #orderpage .result-actions { padding: 0; }
    #orderpage .result-actions .result-button { font-size: 15px; border-radius: 0 0 10px 10px; height: 40px; line-height: 26px; }
    #orderpage .result-hostname { white-space: normal; }
    #orderpage .mid { display: inline; }
    #orderpage .description-container, #orderpage .spotlight-product { flex-basis: auto; width: 100%; }
}

@media (max-width: 480px) {
    #orderpage .mid { display: none; }
    #orderpage .min { display: inline; }
    #orderpage .price-period { font-size: 0; }
}

.spacing { padding: 0; margin: 0; }
