/*
Theme Name: HomeCamp
Theme URI: https://homecamp.eu
Description: Astra child theme for HomeCamp RV parking marketplace
Author: HomeCamp Team
Author URI: https://homecamp.eu
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: homecamp
*/

/* ===================================
   VARIABLES
   =================================== */
:root {
    --hc-primary: #2271b1;
    --hc-secondary: #50575e;
    --hc-success: #00a32a;
    --hc-danger: #d63638;
    --hc-warning: #dba617;
    --hc-border: #dcdcde;
    --hc-bg-light: #f6f7f7;
    --hc-text: #1e1e1e;
    --hc-text-light: #757575;
    --hc-radius: 8px;
    --hc-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --hc-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ===================================
   GLOBAL STYLES
   =================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--hc-text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.button,
.hc-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--hc-primary);
    color: white;
    border: none;
    border-radius: var(--hc-radius);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.button:hover,
.hc-btn:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: var(--hc-shadow-lg);
}

.hc-btn-secondary {
    background: white;
    color: var(--hc-primary);
    border: 2px solid var(--hc-primary);
}

.hc-btn-secondary:hover {
    background: var(--hc-primary);
    color: white;
}

/* ===================================
   HERO SECTION
   =================================== */
.hc-hero {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 120px 20px 80px;
    text-align: center;
    color: white;
}

.hc-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('assets/images/hero-pattern.svg') repeat;
    opacity: 0.1;
}

.hc-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hc-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hc-hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* ===================================
   SEARCH FORM
   =================================== */
.hc-search-form {
    background: white;
    padding: 30px;
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow-lg);
    max-width: 900px;
    margin: -40px auto 0;
    position: relative;
    z-index: 2;
}

.hc-search-form form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
}

.hc-search-form input {
    padding: 14px 16px;
    border: 2px solid var(--hc-border);
    border-radius: var(--hc-radius);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.hc-search-form input:focus {
    outline: none;
    border-color: var(--hc-primary);
}

.hc-search-form button {
    padding: 14px 32px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .hc-search-form form {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   LISTINGS GRID
   =================================== */
.hc-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.hc-listing-card {
    background: white;
    border-radius: var(--hc-radius);
    overflow: hidden;
    box-shadow: var(--hc-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.hc-listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hc-shadow-lg);
}

.hc-listing-card-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    background: var(--hc-bg-light);
    overflow: hidden;
}

.hc-listing-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hc-listing-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--hc-shadow);
}

.hc-listing-card-content {
    padding: 20px;
}

.hc-listing-card h3 {
    font-size: 20px;
    margin: 0 0 8px 0;
    color: var(--hc-text);
}

.hc-listing-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--hc-text-light);
    font-size: 14px;
    margin-bottom: 12px;
}

.hc-listing-card-amenities {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hc-amenity-tag {
    background: var(--hc-bg-light);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--hc-secondary);
}

.hc-listing-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--hc-border);
}

.hc-listing-card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--hc-primary);
}

.hc-listing-card-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--hc-text-light);
}

.hc-listing-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

/* ===================================
   LISTING DETAIL PAGE
   =================================== */
.hc-listing-detail {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.hc-listing-header {
    margin-bottom: 30px;
}

.hc-listing-header h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.hc-listing-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--hc-text-light);
}

.hc-listing-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    height: 500px;
    border-radius: var(--hc-radius);
    overflow: hidden;
    margin-bottom: 40px;
}

.hc-gallery-item {
    position: relative;
    overflow: hidden;
    background: var(--hc-bg-light);
}

.hc-gallery-item:first-child {
    grid-row: 1 / 3;
}

.hc-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hc-gallery-item:hover img {
    transform: scale(1.05);
}

.hc-listing-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.hc-listing-description {
    line-height: 1.8;
}

.hc-listing-section {
    margin-bottom: 40px;
}

.hc-listing-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.hc-amenities-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hc-amenity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
}

.hc-amenity-icon {
    width: 24px;
    height: 24px;
    color: var(--hc-primary);
}

/* ===================================
   BOOKING WIDGET (Sticky Sidebar)
   =================================== */
.hc-booking-widget {
    background: white;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    padding: 24px;
    position: sticky;
    top: 20px;
    box-shadow: var(--hc-shadow);
}

.hc-booking-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--hc-primary);
    margin-bottom: 20px;
}

.hc-booking-price span {
    font-size: 16px;
    font-weight: 400;
    color: var(--hc-text-light);
}

.hc-booking-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.hc-date-input {
    position: relative;
}

.hc-date-input label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    color: var(--hc-text-light);
}

.hc-date-input input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--hc-border);
    border-radius: var(--hc-radius);
    font-size: 14px;
}

.hc-booking-summary {
    padding: 16px;
    background: var(--hc-bg-light);
    border-radius: var(--hc-radius);
    margin-bottom: 16px;
}

.hc-booking-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.hc-booking-row:last-child {
    padding-top: 12px;
    border-top: 2px solid var(--hc-border);
    font-weight: 700;
    font-size: 18px;
}

.hc-booking-widget button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* ===================================
   DASHBOARD
   =================================== */
.hc-dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.hc-dashboard-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--hc-border);
}

.hc-dashboard-nav a {
    padding: 12px 20px;
    text-decoration: none;
    color: var(--hc-text-light);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.hc-dashboard-nav a:hover,
.hc-dashboard-nav a.active {
    color: var(--hc-primary);
    border-bottom-color: var(--hc-primary);
}

.hc-dashboard-section {
    background: white;
    padding: 30px;
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow);
    margin-bottom: 30px;
}

.hc-bookings-list {
    display: grid;
    gap: 20px;
}

.hc-booking-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    transition: box-shadow 0.3s ease;
}

.hc-booking-item:hover {
    box-shadow: var(--hc-shadow);
}

.hc-booking-image {
    width: 120px;
    height: 90px;
    border-radius: var(--hc-radius);
    overflow: hidden;
}

.hc-booking-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hc-booking-details h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.hc-booking-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.hc-booking-status.pending {
    background: #fff3cd;
    color: #856404;
}

.hc-booking-status.confirmed {
    background: #d4edda;
    color: #155724;
}

.hc-booking-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ===================================
   MESSAGES
   =================================== */
.hc-messages-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    height: calc(100vh - 200px);
    background: white;
    border-radius: var(--hc-radius);
    overflow: hidden;
    box-shadow: var(--hc-shadow);
}

.hc-conversations-list {
    border-right: 1px solid var(--hc-border);
    overflow-y: auto;
}

.hc-conversation-item {
    padding: 16px;
    border-bottom: 1px solid var(--hc-border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.hc-conversation-item:hover,
.hc-conversation-item.active {
    background: var(--hc-bg-light);
}

.hc-conversation-item.unread {
    background: #e8f4fd;
}

.hc-chat-window {
    display: flex;
    flex-direction: column;
}

.hc-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.hc-message {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.hc-message.sent {
    flex-direction: row-reverse;
}

.hc-message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--hc-bg-light);
}

.hc-message.sent .hc-message-bubble {
    background: var(--hc-primary);
    color: white;
}

.hc-chat-input {
    padding: 20px;
    border-top: 1px solid var(--hc-border);
}

.hc-chat-input form {
    display: flex;
    gap: 12px;
}

.hc-chat-input textarea {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--hc-border);
    border-radius: var(--hc-radius);
    resize: none;
    font-family: inherit;
}

/* ===================================
   REVIEWS
   =================================== */
.hc-reviews-section {
    margin-top: 40px;
}

.hc-reviews-summary {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    padding: 30px;
    background: var(--hc-bg-light);
    border-radius: var(--hc-radius);
    margin-bottom: 30px;
}

.hc-rating-overall {
    text-align: center;
}

.hc-rating-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--hc-primary);
}

.hc-rating-breakdown {
    display: grid;
    gap: 12px;
}

.hc-rating-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hc-rating-label {
    width: 120px;
    font-size: 14px;
}

.hc-rating-progress {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.hc-rating-fill {
    height: 100%;
    background: var(--hc-primary);
}

.hc-review-item {
    padding: 24px;
    border-bottom: 1px solid var(--hc-border);
}

.hc-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.hc-reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hc-reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--hc-bg-light);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 968px) {
    .hc-listing-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .hc-booking-widget {
        position: relative;
        top: 0;
    }
    
    .hc-messages-container {
        grid-template-columns: 1fr;
    }
    
    .hc-conversations-list {
        display: none;
    }
}

@media (max-width: 768px) {
    .hc-hero h1 {
        font-size: 32px;
    }
    
    .hc-listing-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, 1fr);
        height: auto;
    }
    
    .hc-listing-gallery .hc-gallery-item:first-child {
        grid-row: auto;
    }
}

/* ===================================
   UTILITIES
   =================================== */
.hc-mt-1 { margin-top: 8px; }
.hc-mt-2 { margin-top: 16px; }
.hc-mt-3 { margin-top: 24px; }
.hc-mt-4 { margin-top: 32px; }

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

.hc-text-center { text-align: center; }
.hc-text-muted { color: var(--hc-text-light); }
.hc-text-primary { color: var(--hc-primary); }

.hc-hidden { display: none; }
.hc-visible { display: block; }
