/**
 * Rental Equipment Manager — Frontend Styles
 * Designed to work with Flatsome theme.
 */

/* ─── Layout ─────────────────────────────────────────────── */

.rem-single-wrap,
.rem-archive-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

/* ─── Breadcrumb ─────────────────────────────────────────── */

.rem-breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    color: #6b7280;
}

.rem-breadcrumb a {
    color: #374151;
    text-decoration: none;
}

.rem-breadcrumb a:hover {
    text-decoration: underline;
}

.rem-breadcrumb__sep {
    margin: 0 0.5rem;
    color: #d1d5db;
}

.rem-breadcrumb__current {
    color: #9ca3af;
}

/* ─── Archive Header ─────────────────────────────────────── */

.rem-archive-header {
    margin-bottom: 2rem;
}

.rem-archive-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #111827;
}

.rem-archive-desc {
    font-size: 1.05rem;
    color: #6b7280;
    margin: 0;
    max-width: 600px;
}

.rem-archive-extra {
    margin-top: 1rem;
}

/* ─── Category Filters ───────────────────────────────────── */

.rem-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.rem-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    font-family: inherit;
}

.rem-filter-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
    text-decoration: none;
}

.rem-filter-btn--active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.rem-filter-btn--active:hover {
    background: #1f2937;
    color: #fff;
}

.rem-filter-btn__count {
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
}

.rem-filter-btn--active .rem-filter-btn__count {
    background: rgba(255, 255, 255, 0.2);
}

/* ─── Equipment Grid ─────────────────────────────────────── */

.rem-equipment-grid {
    margin-bottom: 2rem;
}

.rem-grid-item.rem-hidden {
    display: none;
}

/* ─── Equipment Card ─────────────────────────────────────── */

.rem-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    margin-bottom: 1.5rem;
}

.rem-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.rem-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.rem-card__link:hover {
    text-decoration: none;
    color: inherit;
}

.rem-card__image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
    overflow: hidden;
}

.rem-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rem-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Status badge — below image, inside card body */
.rem-card__status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.4rem;
}

.rem-card__body {
    padding: 1rem 1.25rem 1.25rem;
}

.rem-card__category {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
}

.rem-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: #111827;
    line-height: 1.3;
}

.rem-card__price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.rem-card__price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
}

/* ─── Status Badge Colors ────────────────────────────────── */
/* Available = Green, On Rental = Yellow, In Shop = Red, On Request = Blue */

.rem-status--available {
    background: #dcfce7;
    color: #166534;
}

.rem-status--rented {
    background: #fef3c7;
    color: #92400e;
}

.rem-status--maintenance {
    background: #fee2e2;
    color: #991b1b;
}

.rem-status--on-order {
    background: #dbeafe;
    color: #1e40af;
}

/* ─── Single Page ────────────────────────────────────────── */

.rem-single-content {
    margin-bottom: 3rem;
}

.rem-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: #111827;
    line-height: 1.25;
}

.rem-category-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 0 0 1rem;
}

.rem-status-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 1.5rem;
}

/* ─── Gallery ────────────────────────────────────────────── */

.rem-gallery__main {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: #f3f4f6;
}

.rem-gallery__hero {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.rem-gallery__thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rem-gallery__thumb {
    width: 72px;
    height: 54px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: opacity 0.15s, border-color 0.15s;
    cursor: pointer;
}

.rem-gallery__thumb:hover,
.rem-gallery__thumb--active {
    opacity: 1;
    border-color: #111827;
}

.rem-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rem-gallery__placeholder {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
    border-radius: 8px;
}

/* ─── Pricing Box — yellow left bar style ────────────────── */

.rem-pricing {
    border-left: 4px solid #ffa810;
    background: #faf8f5;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 0;
}

.rem-pricing__heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #111827;
    margin: 0 0 0.75rem;
    font-weight: 700;
}

.rem-pricing__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.rem-pricing__tier {
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: #fff;
    border-radius: 0;
    border: 1px solid #e5e7eb;
}

.rem-pricing__amount {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.rem-pricing__period {
    display: block;
    font-size: 0.8rem;
    color: #111827;
    margin-top: 0.15rem;
}

.rem-pricing__note {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 0.25rem;
}

.rem-pricing__deposit,
.rem-pricing__min {
    font-size: 0.85rem;
    color: #374151;
    margin: 0.25rem 0 0;
}

/* ─── Combined Pricing ───────────────────────────────────── */

.rem-pricing__combined {
    padding: 0.5rem 0;
    text-align: left;
}

.rem-pricing__combined .rem-pricing__amount {
    font-size: 1.75rem;
}

.rem-pricing__combined .rem-pricing__period {
    font-size: 0.9rem;
    margin-top: 0;
}

.rem-pricing__plus {
    display: block;
    margin: 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
}

.rem-pricing__combined .rem-pricing__note {
    margin-top: 0.5rem;
}

/* ─── CTA ────────────────────────────────────────────────── */

.rem-cta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.rem-cta .rem-cta__request {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 0;
    text-transform: uppercase;
    box-sizing: border-box;
}

.rem-cta .rem-cta__call {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 0;
    box-sizing: border-box;
    background-color: #ffa810 !important;
    border-color: #ffa810 !important;
    color: #111827 !important;
    text-decoration: none;
}

.rem-cta .rem-cta__call:hover {
    background-color: #e69500 !important;
    border-color: #e69500 !important;
    color: #111827 !important;
    text-decoration: none;
}

/* ─── Short Description ──────────────────────────────────── */

.rem-short-description {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ─── Location / Delivery ────────────────────────────────── */

.rem-location {
    font-size: 0.9rem;
    color: #374151;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.rem-location p {
    margin: 0 0 0.35rem;
}

.rem-location strong {
    color: #111827;
}

/* ─── Full Description ───────────────────────────────────── */

.rem-full-description {
    max-width: 800px;
    margin-bottom: 3rem;
}

.rem-full-description h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #111827;
}

/* ─── Specs Table ────────────────────────────────────────── */

.rem-specs {
    max-width: 800px;
    margin-bottom: 3rem;
}

.rem-specs h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #111827;
}

.rem-specs__table {
    width: 100%;
    border-collapse: collapse;
}

.rem-specs__table th,
.rem-specs__table td {
    padding: 0.65rem 1rem;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid #e5e7eb;
}

.rem-specs__table th {
    width: 40%;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

.rem-specs__table td {
    color: #111827;
}

.rem-specs__table tr:last-child th,
.rem-specs__table tr:last-child td {
    border-bottom: none;
}

/* ─── Related Equipment ──────────────────────────────────── */

.rem-related {
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
    margin-bottom: 2rem;
}

.rem-related h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: #111827;
}

/* ─── Pagination ─────────────────────────────────────────── */

.rem-pagination {
    text-align: center;
    padding-top: 1rem;
}

.rem-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
}

.rem-pagination .page-numbers {
    padding: 0.5rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    color: #374151;
}

.rem-pagination .page-numbers.current {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.rem-pagination .page-numbers:hover:not(.current) {
    background: #f9fafb;
}

/* ─── No Results ─────────────────────────────────────────── */

.rem-no-results {
    text-align: center;
    padding: 4rem 1rem;
}

.rem-no-results p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* ─── Lightbox ───────────────────────────────────────────── */

.rem-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.rem-lightbox--open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rem-lightbox__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

.rem-lightbox__content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rem-lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.rem-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.rem-lightbox__close:hover {
    opacity: 1;
}

.rem-lightbox__prev,
.rem-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0.5rem 0.85rem;
    border-radius: 4px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s, background 0.15s;
}

.rem-lightbox__prev:hover,
.rem-lightbox__next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.rem-lightbox__prev {
    left: 1rem;
}

.rem-lightbox__next {
    right: 1rem;
}

.rem-lightbox__count {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
    .rem-single-wrap,
    .rem-archive-wrap {
        padding: 1rem 0.75rem 2rem;
    }

    .rem-title {
        font-size: 1.4rem;
    }

    .rem-archive-title {
        font-size: 1.5rem;
    }

    .rem-details-col {
        margin-top: 1.5rem;
    }

    .rem-pricing__grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .rem-gallery__thumb {
        width: 56px;
        height: 42px;
    }

    .rem-lightbox__prev,
    .rem-lightbox__next {
        font-size: 1.75rem;
        padding: 0.4rem 0.65rem;
    }

    .rem-lightbox__prev {
        left: 0.5rem;
    }

    .rem-lightbox__next {
        right: 0.5rem;
    }
}

/* ─── Request Form Modal ─────────────────────────────────── */

.rem-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.rem-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.rem-modal__container {
    position: relative;
    z-index: 1;
    background: #fff;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.rem-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.rem-modal__close:hover {
    color: #111827;
}

.rem-modal__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem;
}

.rem-modal__equipment-name {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* ─── Form Fields ────────────────────────────────────────── */

.rem-field {
    margin-bottom: 1rem;
}

.rem-field__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.3rem;
}

.rem-field__req {
    color: #dc2626;
}

.rem-field__light {
    color: #9ca3af;
    font-weight: 400;
}

.rem-field__input {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.rem-field__input:focus {
    outline: none;
    border-color: #ffa810;
    box-shadow: 0 0 0 2px rgba(255, 168, 16, 0.2);
}

.rem-field__readonly {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.rem-field__textarea {
    resize: vertical;
    min-height: 70px;
}

/* Date row */
.rem-field-row {
    display: flex;
    gap: 1rem;
}

.rem-field--half {
    flex: 1;
}

/* Radio buttons */
.rem-field__radios {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.25rem;
}

.rem-field__radio {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: #374151;
}

.rem-field__radio input[type="radio"] {
    margin: 0;
    accent-color: #ffa810;
}

/* T&C checkbox */
.rem-field--tc {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.rem-field__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.4;
}

.rem-field__checkbox input[type="checkbox"] {
    margin: 0.15rem 0 0;
    accent-color: #ffa810;
    flex-shrink: 0;
}

.rem-field__tc-text a {
    color: #5c0000;
    text-decoration: underline;
}

/* Error message */
.rem-form__error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #991b1b;
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
}

/* Submit button */
.rem-form__submit {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 0;
    cursor: pointer;
    transition: opacity 0.15s;
}

.rem-form__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Success State ──────────────────────────────────────── */

.rem-modal__success {
    text-align: center;
    padding: 2rem 1rem;
}

.rem-modal__success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.rem-modal__success-msg {
    font-size: 1rem;
    color: #374151;
    line-height: 1.6;
    margin: 0.75rem 0 1.5rem;
}

.rem-modal__done {
    padding: 0.65rem 2rem;
    font-size: 0.9rem;
}

/* ─── Modal Responsive ───────────────────────────────────── */

@media (max-width: 600px) {
    .rem-modal__container {
        padding: 1.5rem 1.25rem;
        max-height: 95vh;
        border-radius: 8px 8px 0 0;
    }

    .rem-field-row {
        flex-direction: column;
        gap: 0;
    }

    .rem-field--half {
        flex: none;
    }

    .rem-modal__title {
        font-size: 1.15rem;
    }
}
