/* ========================================
   ShopV1 - Theme CSS
   ======================================== */

/* CSS Variables */
:root {
    --tftema-primary: #1c1917;
    --tftema-primary-rgb: 28, 25, 23;
}

/* Base */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #FAF9F6;
    color: #1c1917;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
}

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

/* ========== Dropdown Menu ========== */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.group:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ========== Page Title Area ========== */
.tftema-page-title {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
}

.tftema-page-title--has-bg .tftema-page-title-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--tftema-primary);
    z-index: 0;
}

.tftema-page-title--no-bg {
    background-color: #f5f5f4;
    padding: 60px 0;
}

.tftema-page-title-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.tftema-page-title--has-bg .tftema-page-title-content h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}

.tftema-page-title--no-bg .tftema-page-title-content h1 {
    color: var(--tftema-primary);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}

.tftema-page-title--no-bg .tftema-page-title-content .tftema-page-title-desc {
    color: #78716c;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

/* ========== Breadcrumb ========== */
.tftema-breadcrumb {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tftema-page-title--has-bg .tftema-breadcrumb {
    color: rgba(255, 255, 255, 0.7);
}

.tftema-page-title--has-bg .tftema-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

.tftema-page-title--has-bg .tftema-breadcrumb a:hover {
    color: #fff;
}

.tftema-page-title--has-bg .tftema-breadcrumb .current {
    color: #fff;
}

.tftema-page-title--no-bg .tftema-breadcrumb {
    color: #a8a29e;
}

.tftema-page-title--no-bg .tftema-breadcrumb a {
    color: #a8a29e;
    transition: color 0.3s;
}

.tftema-page-title--no-bg .tftema-breadcrumb a:hover {
    color: var(--tftema-primary);
}

.tftema-page-title--no-bg .tftema-breadcrumb .current {
    color: var(--tftema-primary);
}

.tftema-breadcrumb .sep {
    margin: 0 8px;
    opacity: 0.5;
}

/* ========== Hero Slider ========== */
.tftema-slider {
    position: relative;
}

.tftema-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.tftema-slide.active {
    opacity: 1;
    position: relative;
}

.tftema-slider-arrows {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.tftema-slider-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 14px;
}

.tftema-slider-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* ========== Gallery ========== */
.tftema-gallery {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.tftema-gallery-columns-1 { grid-template-columns: 1fr; }
.tftema-gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.tftema-gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.tftema-gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.tftema-gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.tftema-gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }

.tftema-gallery-item {
    overflow: hidden;
    border-radius: 12px;
}

.tftema-gallery-item a {
    display: block;
}

.tftema-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    aspect-ratio: 1;
}

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

/* ========== Pagination ========== */
.navigation.pagination {
    text-align: center;
}

.navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e7e5e4;
    color: #78716c;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s;
    background: #fff;
}

.navigation.pagination .page-numbers:hover {
    border-color: var(--tftema-primary);
    color: var(--tftema-primary);
}

.navigation.pagination .page-numbers.current {
    background: var(--tftema-primary);
    color: #fff;
    border-color: var(--tftema-primary);
}

.navigation.pagination .prev,
.navigation.pagination .next {
    font-size: 0.75rem;
}

/* ========== Search Form ========== */
.tftema-search-form {
    display: flex;
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
}

.tftema-search-form input[type="search"] {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e7e5e4;
    border-right: none;
    border-radius: 1rem 0 0 1rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    outline: none;
    background: #fff;
    transition: border-color 0.3s;
}

.tftema-search-form input[type="search"]:focus {
    border-color: var(--tftema-primary);
}

.tftema-search-form button {
    padding: 14px 24px;
    background: var(--tftema-primary);
    color: #fff;
    border: none;
    border-radius: 0 1rem 1rem 0;
    cursor: pointer;
    transition: opacity 0.3s;
    font-size: 1rem;
}

.tftema-search-form button:hover {
    opacity: 0.85;
}

/* ========== Search Overlay ========== */
.tftema-search-overlay {
    transition: all 0.4s ease;
}

.tftema-search-overlay input[type="search"] {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #57534e;
    padding: 24px 0;
    font-size: 2rem;
    color: #fff;
    outline: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 300;
}

.tftema-search-overlay input[type="search"]::placeholder {
    color: #57534e;
}

.tftema-search-overlay button[type="submit"] {
    display: none;
}

/* ========== WP Content Styling ========== */
.tftema-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #44403c;
}

.tftema-content p {
    margin-bottom: 1.5em !important;
    display: block !important;
}

.tftema-content h1 {
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin: 2em 0 0.75em !important;
    color: var(--tftema-primary) !important;
    display: block !important;
}

.tftema-content h2 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    margin: 2em 0 0.75em !important;
    color: var(--tftema-primary) !important;
    display: block !important;
}

.tftema-content h3 {
    font-size: 1.375rem !important;
    font-weight: 700 !important;
    margin: 1.75em 0 0.5em !important;
    color: var(--tftema-primary) !important;
    display: block !important;
}

.tftema-content h4 {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    margin: 1.5em 0 0.5em !important;
    display: block !important;
}

.tftema-content h5,
.tftema-content h6 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin: 1.25em 0 0.5em !important;
    display: block !important;
}

.tftema-content ul,
.tftema-content ol {
    margin: 1em 0 !important;
    padding-left: 1.5em !important;
    list-style: revert !important;
}

.tftema-content li {
    margin-bottom: 0.5em !important;
    display: list-item !important;
}

.tftema-content strong,
.tftema-content b {
    font-weight: 700 !important;
}

.tftema-content blockquote {
    border-left: 4px solid var(--tftema-primary);
    padding: 1em 1.5em !important;
    margin: 1.5em 0 !important;
    background: #fafaf9;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #57534e;
}

.tftema-content img {
    border-radius: 12px;
    height: auto;
}

.tftema-content a {
    color: var(--tftema-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tftema-content a:hover {
    color: var(--tftema-primary);
}

.tftema-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.tftema-content th,
.tftema-content td {
    padding: 12px 16px;
    border: 1px solid #e7e5e4;
    text-align: left;
}

.tftema-content th {
    background: #f5f5f4;
    font-weight: 600;
}

/* ========== Line Clamp ========== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== Mobile Menu ========== */
.tftema-mobile-drawer {
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}

.tftema-mobile-overlay {
    transition: opacity 0.4s ease;
}

/* ========== Custom Scrollbar ========== */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

/* ========== Primary Color Buttons ========== */
/* Hide scrollbar */
.scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }

.tftema-btn-primary {
    background-color: var(--tftema-primary);
    color: #fff;
    padding: 14px 32px;
    border-radius: 1rem;
    font-weight: 700;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.tftema-btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 10px 25px rgba(var(--tftema-primary-rgb), 0.2);
}

/* ========== Reviews ========== */
.tftema-star-rating i {
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
}

.tftema-star-rating i:hover {
    transform: scale(1.2);
}

#tftema-review-form textarea:focus,
#tftema-review-form input:focus {
    border-color: var(--tftema-primary);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .tftema-page-title {
        padding: 60px 0;
    }

    .tftema-page-title--has-bg .tftema-page-title-content h1,
    .tftema-page-title--no-bg .tftema-page-title-content h1 {
        font-size: 2rem;
    }

    .tftema-gallery-columns-5,
    .tftema-gallery-columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .tftema-page-title {
        padding: 40px 0;
    }

    .tftema-page-title--has-bg .tftema-page-title-content h1,
    .tftema-page-title--no-bg .tftema-page-title-content h1 {
        font-size: 1.5rem;
    }

    .tftema-gallery-columns-3,
    .tftema-gallery-columns-4,
    .tftema-gallery-columns-5,
    .tftema-gallery-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .tftema-search-overlay input[type="search"] {
        font-size: 1.25rem;
    }

    /* Prevent horizontal overflow on mobile */
    body {
        overflow-x: hidden;
    }

    /* Ensure minimum touch target size */
    button, a, [role="button"], select, input[type="checkbox"], input[type="radio"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Fix input zoom on iOS (font-size < 16px causes zoom) */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Reduce page title padding on small screens */
    .tftema-page-title--no-bg {
        padding: 32px 0;
    }
}
