/* =====================================================
   GLOBAL VARIABLES
===================================================== */

:root {
    /* Brand Colors */
    --brown:       #8b4513;
    --brown-dark:  #6b3d0f;
    --cream:       #faf8f5;
    --dark:        #1a1a1a;
    --mid:         #666666;
    --border:      #e8e0d8;
    --white:       #ffffff;
    --green:       #22c55e;
    --red:         #dc3545;

    /* Shadows */
    --shadow-sm:   0 1px 4px rgba(0,0,0,0.06);
    --shadow-md:   0 4px 16px rgba(0,0,0,0.08);

    /* Radius */
    --radius:      12px;

    /* Layout */
    --container-width: 1400px;
    --section-padding: 80px;
}


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

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s ease;
}

ul, ol {
    padding: 0;
    margin: 0;
    list-style: none;
}

button,
input,
textarea,
select {
    font: inherit;
}


/* =====================================================
   TYPOGRAPHY
===================================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 16px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--dark);
}

h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }

p {
    margin: 0 0 16px;
    color: var(--mid);
}

.small-text {
    font-size: 14px;
    color: var(--mid);
}


/* =====================================================
   LAYOUT UTILITIES
===================================================== */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-padding) 0;
}

.section-sm {
    padding: 40px 0;
}

.section-lg {
    padding: 120px 0;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}


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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    text-align: center;
}

.btn-primary {
    background: var(--brown);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--brown-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--brown);
    color: var(--brown);
}

.btn-outline:hover {
    background: var(--brown);
    color: var(--white);
}

.btn-success {
    background: var(--green);
    color: var(--white);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
}


/* =====================================================
   SPACING UTILITIES
===================================================== */

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 40px; }

.pt-1 { padding-top: 8px; }
.pt-2 { padding-top: 16px; }
.pt-3 { padding-top: 24px; }

.pb-1 { padding-bottom: 8px; }
.pb-2 { padding-bottom: 16px; }
.pb-3 { padding-bottom: 24px; }


/* =====================================================
   SAFARI SEARCH FORM + RESULTS
===================================================== */

/* Main wrappers */
.ph-safari-search-form,
.ph-safari-results-wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    box-sizing: border-box;
}

.ph-safari-search-form * ,
.ph-safari-results-wrap * {
    box-sizing: border-box;
}

/* Search form */
.ph-safari-search-form {
    background: #ffffff;
    border: 1px solid #ece6df;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(18, 18, 18, 0.06);
}

.ph-safari-search-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(200px, 1fr) minmax(200px, 1fr) 150px;
    gap: 14px;
    align-items: center;
}

.ph-search-field {
    width: 100%;
    min-width: 0;
}

.ph-search-field input,
.ph-search-field select {
    width: 100%;
    min-width: 0;
    height: 52px;
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 15px;
    color: #2a2a2a;
    background: #fff;
    box-shadow: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
}

.ph-search-field input::placeholder {
    color: #8a8a8a;
}

.ph-search-field select {
    cursor: pointer;
    padding-right: 42px;
    background-image:
        linear-gradient(45deg, transparent 50%, #8d8d8d 50%),
        linear-gradient(135deg, #8d8d8d 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.ph-search-field input:focus,
.ph-search-field select:focus {
    outline: none;
    border-color: #a85a16;
    box-shadow: 0 0 0 4px rgba(168, 90, 22, 0.10);
    background: #fffdfb;
}

.ph-search-button-wrap {
    width: 100%;
}

.ph-search-button {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #a55a19 0%, #8f4a11 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(143, 74, 17, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ph-search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(143, 74, 17, 0.28);
}

.ph-search-button:active {
    transform: translateY(0);
}

/* Results wrapper */
.ph-safari-results-wrap {
    margin-top: 28px;
}

/* Results heading area */
.ph-safari-results-top {
    margin-bottom: 22px;
}

.ph-safari-results-top h2 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.2;
    color: #1f1f1f;
    font-weight: 700;
}

.ph-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ph-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8efe6;
    color: #7b4518;
    border: 1px solid #eedccc;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
}

/* Results grid */
.ph-safari-results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Card */
.ph-safari-card {
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(16, 16, 16, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ph-safari-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(16, 16, 16, 0.08);
    border-color: #e3d3c4;
}

.ph-safari-card-image {
    display: block;
    overflow: hidden;
}

.ph-safari-card-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.ph-safari-card:hover .ph-safari-card-image img {
    transform: scale(1.04);
}

.ph-safari-card-body {
    padding: 18px 18px 20px;
}

.ph-safari-card-title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
    color: #1f1f1f;
}

.ph-safari-card-title a {
    color: inherit;
    text-decoration: none;
}

.ph-safari-card-title a:hover {
    color: #9a5417;
}

.ph-safari-card-excerpt {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.7;
    color: #5e5e5e;
}

.ph-safari-card-price {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: #1f1f1f;
}

.ph-safari-card-actions {
    margin-top: 8px;
}

.ph-view-safari-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 10px;
    background: #9a5417;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ph-view-safari-btn:hover {
    background: #844612;
    transform: translateY(-1px);
    color: #fff;
}

/* Empty state */
.ph-no-results {
    padding: 40px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
}

/* Pagination */
.ph-safari-pagination {
    margin-top: 34px;
    text-align: center;
}

.ph-safari-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    margin: 0 4px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #e2e2e2;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.ph-safari-pagination .page-numbers.current,
.ph-safari-pagination .page-numbers:hover {
    background: #9a5417;
    border-color: #9a5417;
    color: #fff;
}

/* Responsive */
@media (max-width: 1024px) {
    .ph-safari-search-form {
        padding: 18px;
    }

    .ph-safari-search-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ph-safari-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ph-safari-search-form {
        padding: 16px;
        border-radius: 16px;
    }

    .ph-safari-search-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ph-search-field input,
    .ph-search-field select,
    .ph-search-button {
        height: 50px;
        font-size: 15px;
    }

    .ph-safari-results-top h2 {
        font-size: 24px;
    }

    .ph-safari-results-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .ph-safari-card-image img {
        height: 220px;
    }
}