/*
Theme Name: Tourly Store
Theme URI: https://tourly.com
Author: Tourly
Description: Tema moderno e compacto para lojas de turismo.
Version: 2.0.0
*/

/* =========================================
   Reset & Variables
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --text-main: #334155;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: #fff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Previne scroll horizontal indesejado no mobile */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

/* =========================================
   Layout Grid
   ========================================= */
.tourly-product-layout {
    max-width: 1140px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.tourly-grid-inner {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 992px) {
    .tourly-product-layout {
        margin: 1.5rem auto 4.5rem;
        padding: 0 1rem;
    }
    .tourly-grid-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .tourly-header-section {
        text-align: left;
    }
    .tourly-title {
        font-size: 25px;
    }
    .tourly-inc-exc-wrapper {
        grid-template-columns: 1fr;
        padding: 1.25rem;
        gap: 1.5rem;
    }
}

/* =========================================
   Left Column: Content
   ========================================= */

/* Header Section */
.tourly-header-section {
    margin-bottom: 1.5rem;
}

.tourly-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.tourly-category-badge {
    background: #ecfdf5;
    color: #047857;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.tourly-title {
    font-size: 25px;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
}

.tourly-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.tourly-meta-row .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tourly-meta-row .meta-item i {
    color: var(--accent); /* Icon color */
}

/* Gallery */
.tourly-gallery-section {
    margin-bottom: 2.5rem;
}
.tourly-gallery-section img.tourly-main-image {
    width: 100%;
    max-height: 500px; /* Deixa a imagem mais compacta */
    object-fit: cover; /* Garante que a imagem preencha sem distorcer */
    display: block;
    border-radius: var(--radius);
}
.tourly-gallery-thumbs img.tourly-gallery-thumb.is-active {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Section Common */
.tourly-section-content {
    margin-bottom: 2.5rem;
}
.tourly-section-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Highlights Grid */
.tourly-highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.highlight-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.highlight-card .h-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}
.highlight-card .h-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.highlight-card .h-icon i {
    font-size: 20px;
    color: var(--accent);
}

.highlight-card .h-text strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: var(--primary);
}
.highlight-card .h-text p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--text-light);
    line-height: 1.4;
}

/* Description Content */
.content-body {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.7;
}
.content-body p { margin-bottom: 1rem; }

/* Inclusions / Exclusions Compact */
.tourly-inc-exc-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.inc-exc-col h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.inc-exc-col.included h4 i { color: var(--success); }
.inc-exc-col.excluded h4 i { color: var(--danger); }

.inc-exc-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.inc-exc-col li {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}
.inc-exc-col li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #cbd5e1;
}

/* Meeting Points */
.meeting-points-simple li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    font-weight: 500;
}
.meeting-points-simple li i {
    color: var(--accent);
}

/* Reviews */
.tourly-reviews-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.tourly-reviews-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}
.tourly-reviews-section ol.commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tourly-reviews-section .comment_container {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
}
.tourly-reviews-section .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.tourly-reviews-section .meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 4px;
}
.tourly-reviews-section .description {
    font-size: 0.95rem;
    line-height: 1.5;
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    flex: 1;
}

/* =========================================
   Right Column: Sticky Booking Widget
   ========================================= */
.tourly-sidebar {
    position: relative;
    height: 100%;
}

.tourly-sticky-widget {
    position: sticky;
    top: 90px; /* Considera o header fixo */
    z-index: 10;
}

@media (max-width: 992px) {
    .tourly-sticky-widget {
        position: static;
        top: auto;
        z-index: 1;
    }
}

/* =========================================
   WooCommerce My Account Styling
   ========================================= */

.woocommerce-account .woocommerce {
    display: flex;
    gap: 3rem;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 20px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .woocommerce-account .woocommerce {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Navigation Sidebar */
.woocommerce-MyAccount-navigation {
    flex: 0 0 260px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation li {
    margin-bottom: 0.5rem;
}

.woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.woocommerce-MyAccount-navigation li a:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

.woocommerce-MyAccount-navigation li.is-active a {
    background-color: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Content Area */
.woocommerce-MyAccount-content {
    flex: 1;
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    min-height: 400px;
}

.woocommerce-MyAccount-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* Tables (Orders, Bookings) */
.woocommerce-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.woocommerce-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.woocommerce-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 16px; /* Added padding to th */
    text-align: left; /* Ensure left alignment */
}

.woocommerce-table tr:last-child td {
    border-bottom: none;
}

.woocommerce-table .woocommerce-button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    transition: all 0.2s;
    text-decoration: none; /* Ensure no underline */
    display: inline-block; /* Ensure padding works */
}

.woocommerce-table .woocommerce-button:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Status Badges */
.order-status, .booking-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-completed, .status-paid { background: #d1fae5; color: #065f46; }
.status-processing, .status-pending-confirmation { background: #fff7ed; color: #9a3412; }
.status-cancelled, .status-failed { background: #fee2e2; color: #991b1b; }
.status-on-hold { background: #fef3c7; color: #92400e; }

/* Forms (Address, Details) */
.woocommerce-MyAccount-content form {
    max-width: 600px;
}
.woocommerce-MyAccount-content .form-row {
    margin-bottom: 1.5rem;
}
.woocommerce-MyAccount-content label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}
.woocommerce-MyAccount-content .input-text,
.woocommerce-MyAccount-content select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.woocommerce-MyAccount-content .input-text:focus,
.woocommerce-MyAccount-content select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.woocommerce-MyAccount-content button[type="submit"] {
    background-color: var(--primary);
    color: #fff;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.woocommerce-MyAccount-content button[type="submit"]:hover {
    background-color: var(--primary-light);
}

/* Hide default Welcome message if redirected, but just in case */
.woocommerce-MyAccount-content > p:first-of-type {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Mobile Responsive Tables */
@media screen and (max-width: 768px) {
    .woocommerce-table, 
    .woocommerce-table tbody, 
    .woocommerce-table tr, 
    .woocommerce-table td {
        display: block;
        width: 100%;
    }
    
    .woocommerce-table thead {
        display: none;
    }
    
    .woocommerce-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 1rem;
        background: #fff;
    }
    
    .woocommerce-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
    }
    
    .woocommerce-table td:last-child {
        border-bottom: none;
    }
    
    .woocommerce-table td::before {
        content: attr(data-title);
        font-weight: 600;
        text-align: left;
        margin-right: 1rem;
        color: var(--text-light);
        font-size: 0.9rem;
    }
    
    .woocommerce-table .woocommerce-button {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
}
