/* ── Order & Contact Forms ── */

.page-order .order-page-main,
.page-contact .contact-page-main {
    background: #eceff3;
}

.order-page-main { padding: 30px 0 0; }
.order-page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.order-form-panel {
    background: #fff;
    border-radius: 4px;
    padding: 28px 32px 32px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.order-full-form .form-field { margin-bottom: 18px; }
.order-full-form label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.order-full-form .req { color: #e74c3c; }
.order-full-form .field-info {
    color: #999;
    font-size: 0.8rem;
    margin-left: 4px;
    cursor: help;
}

.form-control-custom,
.order-full-form select.form-control-custom,
.order-full-form textarea.form-control-custom {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 0 12px;
    min-height: 40px;
    font-size: 0.875rem;
    line-height: 1.25;
    color: #333;
    background: #fff;
    font-family: var(--font-body);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.order-full-form textarea.form-control-custom {
    min-height: 120px;
    padding: 10px 12px;
}
.form-control-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(45, 64, 48, 0.12);
}
.form-control-custom.is-invalid,
.phone-field-wrap .is-invalid {
    border-color: #e74c3c !important;
    background: #fff5f5;
}
.form-control-custom.is-valid:not([readonly]) {
    border-color: #28a745;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.form-row-2 .form-field { margin-bottom: 0; }

.field-error {
    display: block;
    color: #e74c3c;
    font-size: 0.78rem;
    margin-top: 4px;
    min-height: 1em;
}

.form-alert {
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    font-weight: 600;
}
.form-alert-error {
    background: #fff5f5;
    border: 1px solid #f5c2c7;
    color: #b42318;
}

/* Phone with country flags */
.phone-field-wrap {
    display: flex;
    gap: 8px;
}
.phone-field-wrap .phone-number-input { flex: 1; min-width: 0; }

.country-code-picker {
    position: relative;
    flex: 0 0 150px;
    min-width: 0;
}
.country-code-compact { flex: 0 0 108px; }

.country-code-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 38px;
    height: 38px;
    padding: 0 10px;
    cursor: pointer;
    text-align: left;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.25;
}
.country-code-trigger .country-flag {
    flex-shrink: 0;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.country-code-trigger .country-dial {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
}
.country-code-trigger .country-chevron {
    font-size: 0.7rem;
    color: #888;
    flex-shrink: 0;
}
.country-code-picker.is-open .country-chevron { transform: rotate(180deg); }

.country-code-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 1100;
    min-width: 220px;
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.country-code-compact .country-code-menu { min-width: 180px; }
.country-code-menu[hidden] { display: none; }

.country-code-menu li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.84rem;
    color: #333;
}
.country-code-menu li:hover,
.country-code-menu li.is-selected {
    background: rgba(45, 64, 48, 0.06);
}
.country-code-menu li img {
    flex-shrink: 0;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.country-code-menu li strong {
    display: inline-block;
    min-width: 42px;
    font-weight: 700;
}
.country-option-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Word counter on order page */
.order-word-counter {
    display: flex;
    align-items: stretch;
    border: 1px solid #ccc;
    border-radius: 3px;
    overflow: hidden;
}
.order-word-counter .btn-counter {
    width: 36px;
    border: none;
    background: #f5f5f5;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    color: #555;
}
.order-word-counter .btn-counter:hover { background: var(--primary); color: #fff; }
.order-word-counter .words-display,
.order-word-counter .form-control-custom {
    border: none;
    border-radius: 0;
    text-align: center;
    flex: 1;
}
.pages-hint { font-size: 0.75rem; color: #888; margin-top: 4px; display: block; }

/* Deadline calendar field */
.deadline-wrap { position: relative; }
.deadline-date-input,
input[name="deadline"][type="date"] {
    width: 100%;
    cursor: pointer;
    color-scheme: light;
}
.deadline-date-input::-webkit-calendar-picker-indicator,
input[name="deadline"][type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.75;
    filter: sepia(0.4) saturate(2) hue-rotate(60deg);
}
.banner-form-card .banner-deadline-input,
.banner-form-card input[type="date"] {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 8px 11px;
    font-size: 0.85rem;
    margin-bottom: 0;
    color: #333;
    background: #fff;
    flex: 1;
    min-height: 38px;
}
.banner-form-card .deadline-block { flex: 1; }

/* File upload box */
.file-upload-box {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 12px;
    background: #fafafa;
    transition: border-color 0.25s, background 0.25s;
}
.file-upload-box.upload-success {
    border-color: #28a745;
    background: #f0fff4;
}
.file-upload-box.upload-error {
    border-color: #e74c3c;
    background: #fff5f5;
}
.file-upload-inner {
    display: flex;
    gap: 8px;
    align-items: stretch;
    position: relative;
}
.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.file-name-display {
    flex: 1;
    cursor: pointer;
    background: #fff;
}
.btn-upload-file {
    background: #555;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 9px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    z-index: 3;
}
.btn-upload-file:hover { background: #333; }
.upload-status-msg {
    margin: 8px 0 0;
    font-size: 0.82rem;
    font-weight: 600;
    min-height: 1.2em;
}
.file-upload-box.upload-success .upload-status-msg { color: #28a745; }
.file-upload-box.upload-error .upload-status-msg { color: #e74c3c; }
.upload-hint {
    color: #e74c3c;
    font-size: 0.78rem;
    margin: 6px 0 0;
}

/* Currency toggles */
.currency-section { margin: 24px 0 20px; }
.currency-label {
    font-size: 0.82rem;
    color: #666;
    margin-bottom: 12px;
}
.currency-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.currency-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}
.currency-option input { display: none; }
.currency-option.active,
.currency-option:hover {
    border-color: var(--primary);
    background: rgba(45, 64, 48, 0.06);
}
.currency-option img { border-radius: 2px; }

.btn-continue-order {
    display: block;
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-continue-order:hover { background: var(--accent-hover); color: #fff; }

/* Trust sidebar */
.order-trust-sidebar { display: flex; flex-direction: column; gap: 14px; }
.trust-rating-box {
    background: #3d3d3d;
    color: #fff;
    padding: 18px;
    border-radius: 4px;
    text-align: center;
}
.trust-rating-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 8px;
}
.trust-score { font-size: 2rem; font-weight: 800; line-height: 1; }
.trust-stars { color: #f5c518; font-size: 0.85rem; letter-spacing: 1px; }
.trust-delivered { font-size: 0.78rem; opacity: 0.85; margin: 0; }

.trust-reviews-box {
    background: #fff;
    border-radius: 4px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.trust-review-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
}
.trust-review-row:last-child { border-bottom: none; }
.trust-brand {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.75rem; color: #fff;
}
.trust-brand.google { background: var(--primary); }
.trust-brand.tp { background: #00b67a; }
.trust-brand-label { flex: 1; font-weight: 600; }
.trust-brand-stars { color: #f5c518; font-size: 0.75rem; }

.trust-badges-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.trust-badge-item {
    background: #fff;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.trust-badge-item i { color: var(--primary); }

.trust-payments-box {
    background: #fff;
    border-radius: 4px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.trust-secure-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.secure-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 4px;
}
.payment-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #888;
}

/* Benefits strip */
.order-benefits-strip {
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 30px 0 40px;
    margin-top: 30px;
}
.order-benefits-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}
.order-benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 40px;
    max-width: 700px;
    margin: 0 auto;
}
.order-benefits-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.order-benefits-grid li {
    padding: 5px 0 5px 24px;
    position: relative;
    font-size: 0.88rem;
    color: #444;
}
.order-benefits-grid li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: 700;
}

/* Success box */
.order-success-box {
    background: #fff;
    border-radius: 8px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin: 30px 0;
}
.order-success-box i {
    font-size: 3rem;
    color: #28a745;
    display: block;
    margin-bottom: 16px;
}
.order-success-box h2,
.order-success-box h3 { color: var(--primary); margin-bottom: 12px; }

/* Contact page */
.contact-page-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}
.contact-info-panel .section-title { margin-bottom: 12px; }
.contact-info-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}
.contact-info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 0.95rem;
}
.contact-info-list i { color: var(--primary); font-size: 1.1rem; }
.contact-info-list .bi-whatsapp { color: #25d366; }
.contact-hours {
    background: var(--bg-light);
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    border-left: 4px solid var(--primary);
}
.contact-form-panel {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.contact-form-panel h3 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
}
.contact-form .form-field { margin-bottom: 16px; }
.contact-form label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.contact-success { margin: 0; }

.form-alert-error {
    background: #fff5f5;
    border: 1px solid #e74c3c;
    color: #c0392b;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 18px;
    font-size: 0.88rem;
}

/* Homepage banner form validation */
.banner-form-card .field-error {
    color: #ffcccc;
    font-size: 0.72rem;
    margin-top: 2px;
    margin-bottom: 4px;
    display: block;
}
.banner-form-card .form-control-custom.is-invalid,
.banner-form-card input.is-invalid,
.banner-form-card select.is-invalid {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 1px rgba(255,107,107,0.3);
}
.banner-form-card .phone-field-wrap select,
.banner-form-card .phone-field-wrap input,
.banner-form-card .phone-field-wrap .country-code-trigger {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 8px;
    font-size: 0.85rem;
}
.banner-form-card .country-code-picker { flex: 0 0 108px; }
.banner-form-card .country-code-trigger {
    padding: 8px 6px;
    height: 100%;
    min-height: 38px;
}

@media (max-width: 991px) {
    .order-page-layout { grid-template-columns: 1fr; }
    .order-trust-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .trust-badges-row { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
    .trust-badge-item { flex: 1; min-width: 140px; }
    .contact-page-layout { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .form-row-2 { grid-template-columns: 1fr; }
    .currency-options { grid-template-columns: repeat(2, 1fr); }
    .order-benefits-grid { grid-template-columns: 1fr; }
    .order-form-panel { padding: 20px 16px; }
    .order-trust-sidebar { grid-template-columns: 1fr; }
    .phone-field-wrap { flex-direction: column; }
    .country-code-picker,
    .country-code-compact { flex: 1; width: 100%; }
    .country-code-menu { min-width: 100%; max-width: 100%; left: 0; right: 0; }
    .contact-page-layout { gap: 20px; }
    .contact-info-panel { padding: 20px 16px; }
    .contact-form-panel { padding: 20px 16px; }
    .file-upload-box { padding: 20px 12px; }
}

@media (max-width: 575px) {
    .currency-options { grid-template-columns: 1fr; }
    .order-page-layout { gap: 16px; }
    .trust-badges-row { flex-direction: column; }
    .trust-badge-item { min-width: 0; width: 100%; }
}
