/*
Theme Name: DuWaale Theme
Theme URI: http://example.com/duwaale-theme
Author: Antigravity
Author URI: http://example.com
Description: A mobile-first community platform theme for DuWaale.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: duwaale-theme
*/

:root {
    --color-dark-gray: #1f2937;
    --color-primary: #Ef5f5f;
    /* Fallback purple */
    --color-accent: #f97316;
    /* Orange */
    --color-bg-light: #ffffff;
    --color-text-main: #111827;
    --color-text-sub: #6b7280;
    --color-border: #e5e7eb;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --radius-card: 16px;
    --radius-pill: 9999px;
    --spacing-base: 8px;
    --header-height: 64px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #ffffff;
    color: var(--color-text-main);
    line-height: 1.6;
    padding-bottom: 80px;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    /* Light gray */
    border-radius: 5px;
    border: 2px solid #f3f4f6;
    /* Creates padding effect vs bg */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    /* Tighter tracking for headings */
    color: #ffffff;
}

.site-header .logo img {
    max-height: 25px;
    width: auto;
    object-fit: contain;
}

.site-header {
    position: sticky;
    top: 0;
    min-height: auto;
    background-color: #ffffff;
    color: var(--color-text-main);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 16px;
    z-index: 1000;
    overflow: hidden;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: none;
}

/* Wave Section */
.wave-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    pointer-events: none;
    /* Let clicks pass through if needed */
    z-index: 0;
}

.waves-svg {
    position: relative;
    width: 100%;
    height: 80px;
    min-height: 60px;
    max-height: 100px;
    display: block;
}

/* Wave Animations - Controlled by Scroll via JS */
.parallax>use {
    transition: transform 0.1s linear;
}

/* Mobile Adjustments for Waves */
@media (max-width: 768px) {
    .waves-svg {
        height: 60px;
    }

    .site-header {
        min-height: auto;
    }
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 10;
}

.notification-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 1px solid var(--color-dark-gray);
}

/* Category Navigation - Rectangular Premium Design */
.category-nav {
    padding: 10px 0;
    background-color: #ffffff;
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-list {
    display: flex;
    padding: 0 16px;
    gap: 12px;
}

.category-list::after {
    content: '';
    flex: 0 0 20px;
    /* Force extra space at the end of scroll */
}

.category-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    padding: 10px 16px;
    border-radius: 12px;
    min-width: 140px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

.category-item:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(239, 95, 95, 0.08);
}

.category-item:active {
    transform: scale(0.98);
}

.category-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.category-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all 0.2s;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
    /* Subtle border for white-on-white visibility */
}

.category-item:hover .category-icon {
    background-color: var(--color-primary);
    color: #ffffff;
}

.category-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.5;
    /* Slightly thicker stroke for smaller size */
}

.category-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.category-label-sub {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 400;
}

/* Hero Banner (Swiper Slider - Samsung Style) */
.hero-section {
    padding: 0 16px;
    margin-top: 8px;
    margin-bottom: 24px;
    width: 100%;
}

.hero-container {
    width: 100%;
    position: relative;
    border-radius: 16px;
    /* Matching theme's --radius-card */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: #fff;
}

/* 16:9 Aspect Ratio Box */
.aspect-ratio-box {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 ratio */
    height: 0;
}

.swiper-hero {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Fraction Pagination Styling --- */

.swiper-pagination-fraction {
    background: rgba(0, 0, 0, 0.4);
    /* Dark pill background */
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;

    /* Positioning */
    width: auto !important;
    left: auto !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: 10;
}

.swiper-pagination-current,
.swiper-pagination-total {
    background: none;
    padding: 0;
}

/* Fallback Slide */
.fallback-slide {
    background: linear-gradient(135deg, #8b5cf6, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    height: 100%;
}

/* Featured Section Header */
.featured-header {
    background: #ffffff;
    padding: 16px 20px 16px;
    /* 16px bottom padding */
    margin: 24px 0 0;
    display: flex;
    align-items: center;
    border-left: 5px solid var(--color-primary);
    /* Primary color left border */
    position: relative;
    overflow: hidden;
    /* Stylized gradient overlay from left (primary) to right */
    background: linear-gradient(to right, rgba(239, 95, 95, 0.12) 0%, #ffffff 50%);
}

/* Home Events Section */
.home-events-section {
    padding: 24px 0;
    background: #fff;
    overflow: hidden;
}

.section-header {
    padding: 0 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header .bar {
    width: 4px;
    height: 24px;
    background-color: var(--color-primary);
    border-radius: 2px;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.events-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    /* Fixed scroll-snap alignment */
    padding: 0 16px 20px;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
}

.events-carousel::-webkit-scrollbar {
    display: none;
}

.event-card-item {
    min-width: 240px;
    /* Decreased width */
    width: 240px;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-margin: 0 16px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.event-card-top {
    padding: 16px;
    background-color: #f8fafc;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.event-card-info {
    flex: 1;
}

.event-card-category {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.event-card-category svg {
    width: 14px;
    height: 14px;
}

.event-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #94a3b8;
}

.event-card-location svg {
    width: 12px;
    height: 12px;
}

.event-card-image {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.event-card-bottom {
    padding: 16px;
    background: #fff;
}

.event-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    /* Changed to Black */
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card-org {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-all-events-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 16px;
    padding: 12px;
    background-color: rgba(239, 95, 95, 0.08);
    /* Primary color low opacity */
    color: var(--color-primary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid rgba(239, 95, 95, 0.15);
}

.view-all-events-btn:active {
    transform: scale(0.98);
    background-color: rgba(239, 95, 95, 0.15);
}

/* Updates Section Card Styles */
.updates-section {
    padding: 24px 0;
    background: #f9fafb;
}

.update-card {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    margin: 0 16px 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.update-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.update-username {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.update-status {
    font-size: 14px;
    color: var(--color-primary);
    margin-left: -4px;
}

.update-follow-btn {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: #111827;
    border: none;
    padding: 6px 16px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s;
}

.update-follow-btn.following {
    background: #f3f4f6;
    color: #4b5563;
}

.update-follow-btn:active {
    transform: scale(0.95);
}

.update-body {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: center;
}

.update-text {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.update-text a {
    text-decoration: none;
    color: inherit;
}

.update-image-wrap {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.update-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.update-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.update-time-left {
    font-size: 14px;
    color: #9ca3af;
}

.update-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    color: #9ca3af;
}

.update-action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color 0.2s;
}

.update-action-item:hover {
    color: var(--color-primary);
}

.update-action-item svg {
    width: 20px;
    height: 20px;
}

.update-action-item span {
    font-size: 14px;
    font-weight: 500;
}

/* Explore Page Post Card Styles */
.explore-post-card {
    background: #fff;
    border-radius: 28px;
    padding: 24px;
    margin: 0 0 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.explore-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.explore-card-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.explore-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.explore-card-username {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.explore-card-status {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
}

.explore-card-follow-btn {
    font-size: 14px;
    color: #9ca3af;
    background: none;
    border: none;
    padding: 0;
    font-weight: 600;
    cursor: pointer;
}

.explore-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 16px;
    display: block;
    text-decoration: none;
}

.explore-card-image-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #f8fafc;
}

.explore-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.explore-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.explore-card-upload-time {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

.explore-card-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    color: #9ca3af;
}

.explore-action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color 0.2s;
}

.explore-action-item svg {
    width: 22px;
    height: 22px;
}

.explore-action-item span {
    font-size: 15px;
    font-weight: 500;
}

.explore-action-item:hover {
    color: var(--color-primary);
}

.feed-card {
    background-color: white;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
    overflow: hidden;
}

.card-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.card-header-actions .action-item,
.card-header-actions .action-save {
    color: var(--color-primary);
    cursor: pointer;
    transition: color 0.2s;
}

.card-header-actions .action-item:hover,
.card-header-actions .action-save:hover {
    opacity: 0.8;
}

.card-header-actions .action-item,
.card-header-actions .action-save,
.share-btn,
.save-btn {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-header-actions .action-item svg,
.card-header-actions .action-save svg,
.share-btn svg,
.save-btn svg {
    line-height: 1;
    display: block;
}

.save-btn.saved svg {
    fill: var(--color-primary);
}

.like-btn.liked svg {
    fill: var(--color-primary);
    color: var(--color-primary);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-dark-gray);
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-text {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.author-sub {
    font-size: 0.70rem;
    color: var(--color-text-sub);
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-category {
    font-size: 0.70rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.post-category:hover {
    opacity: 0.7;
}

.post-type-badge {
    font-size: 0.65rem;
    color: var(--color-text-sub);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-type-badge.event-badge {
    background-color: #8b5cf6;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-type-badge.event-badge svg {
    width: 12px;
    height: 12px;
}

.btn-follow,
.follow-term-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-follow:hover,
.follow-term-btn:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-follow.following,
.follow-term-btn.following {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Inverse variant for dark backgrounds */
.follow-term-btn.inverse {
    border-color: white;
    color: white;
}

.follow-term-btn.inverse:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.follow-term-btn.inverse.following {
    background-color: white;
    color: var(--color-text-main);
    border-color: white;
}

.card-image-container {
    position: relative;
    width: 100%;
    background-color: #f3f4f6;
    height: 200px;
    /* Requested fixed height */
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-image-link:hover .card-image {
    transform: scale(1.03);
}

.card-body {
    padding: 16px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.card-title a {
    color: #000000;
    /* Pure black */
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--color-primary);
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
}

.meta-time {
    font-size: 0.75rem;
    color: var(--color-text-sub);
}

/* Meta information moved into card-body */
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header-actions .icon {
    width: 20px;
    height: 20px;
}

.meta-time {
    font-size: 0.70rem;
    color: #9ca3af;
    text-transform: uppercase;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--color-text-sub);
    width: 20%;
    height: 100%;
    cursor: pointer;
}

.nav-item.active {
    color: var(--color-primary);
    font-weight: 600;
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
    stroke-width: 2.5px;
    stroke: var(--color-primary);
}

.nav-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Icons (SVG placeholders) */
.icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Toast Notifications */
.duwaale-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #1f2937;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.duwaale-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== PROFILE PAGE ===== */

/* Profile Page Body */
.profile-page {
    background-color: #f3f4f6;
    padding-bottom: 80px;
}

/* Top App Bar */
.profile-app-bar {
    position: sticky;
    top: 0;
    height: 64px;
    background: linear-gradient(135deg, #000000, #1f2937);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-button {
    background: none;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.back-button:active {
    opacity: 0.7;
}

.profile-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
}

.spacer {
    width: 40px;
}

/* Profile Content */
.profile-content {
    padding: 0 0 24px;
}

/* Profile Header Card */
.profile-header-card {
    background: white;
    border-radius: 0 0 20px 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.profile-avatar-wrapper {
    flex-shrink: 0;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

.profile-details {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
}

.profile-bio {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.edit-profile-btn {
    background: #f3f4f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}

.edit-profile-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.edit-profile-btn .icon {
    width: 20px;
    height: 20px;
}

/* Account Menu Card */
.account-menu-card {
    background: white;
    border-radius: 16px;
    margin: 0 16px 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    min-height: 56px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item:active {
    background-color: #f9fafb;
}

.menu-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-icon {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.menu-label {
    flex: 1;
    margin-left: 16px;
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
}

.chevron {
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.menu-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 0 16px;
}

/* Profile Section Card */
.profile-section-card {
    background: white;
    border-radius: 16px;
    margin: 0 16px 24px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px;
}

.saved-items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.saved-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}

.saved-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saved-item-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}

.view-all-link {
    display: inline-block;
    color: #6366f1;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.view-all-link:hover {
    opacity: 0.7;
}

/* Logout Section */
.logout-section {
    padding: 0 16px;
    margin-top: 32px;
}

.logout-btn {
    width: 100%;
    background: #ef4444;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.logout-btn:hover {
    background: #dc2626;
}

.logout-btn:active {
    transform: scale(0.98);
}

.logout-btn .icon {
    width: 20px;
    height: 20px;
}

/* Logout Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
}

.modal-content p {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0 0 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-cancel,
.btn-confirm {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-cancel {
    background: #f3f4f6;
    color: #374151;
    border: none;
}

.btn-cancel:hover {
    background: #e5e7eb;
}

.btn-confirm {
    background: #ef4444;
    color: white;
    border: none;
}

.btn-confirm:hover {
    background: #dc2626;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .profile-content {
        max-width: 600px;
        margin: 0 auto;
    }

    .saved-items-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.profile-avatar {
    border-radius: 50% !important;
}

.profile-avatar-wrapper img {
    border-radius: 50% !important;
    object-fit: cover;
}

/* ===== CUSTOM PRODUCT GRID STYLES (Used in Archives & Custom Pages) ===== */
.custom-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns on mobile */
    gap: 16px;
    margin-bottom: 32px;
}

.custom-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.custom-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.product-thumb {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    background: #f9fafb;
    overflow: hidden;
}

.product-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.custom-product-card:hover .product-thumb img {
    transform: scale(1.05);
}

.no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

/* .onsale removed */

.product-like-btn {
    transition: all 0.2s;
}

.product-like-btn:hover {
    transform: scale(1.1);
}

.product-like-btn svg {
    color: #9ca3af;
    transition: color 0.2s;
}

.product-like-btn:hover svg {
    color: var(--color-primary);
}

.product-details {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    margin-top: auto;
}

.price {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    display: block;
}

.price del {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 400;
    margin-right: 4px;
    text-decoration: line-through;
}

.price ins {
    text-decoration: none;
}

.product-action {
    padding: 0 12px 12px;
}

.product-action .button {
    width: 100%;
    display: block;
    text-align: center;
    background: #111827;
    color: white;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.product-action .button:hover {
    background: #374151;
}

.product-action .added_to_cart {
    display: none;
    /* Hide the 'View Cart' link that appears after adding */
}

/* Child Category Pills */
.child-categories-section {
    margin-bottom: 24px;
}

.child-categories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.child-categories-scroll::-webkit-scrollbar {
    display: none;
}

.child-cat-pill {
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 20px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.child-cat-pill:hover,
.child-cat-pill.active {
    background: #e5e7eb;
    color: #111827;
    border-color: #d1d5db;
}

@media (min-width: 768px) {
    .custom-product-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 columns on desktop */
    }
}

/* ===== BUTTON SPINNER ANIMATION ===== */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(239, 95, 95, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

/* For buttons with dark background (not following state) */
.loading.follow-term-btn:not(.following) .btn-spinner,
.loading.btn-follow:not(.following) .btn-spinner,
.loading.update-follow-btn:not(.following) .btn-spinner {
    border-color: rgba(239, 95, 95, 0.2);
    border-top-color: var(--color-primary);
}

/* For buttons with primary background (following state) */
.loading.following .btn-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
}

@keyframes btn-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Disable pointer events during loading */
.loading {
    pointer-events: none;
    opacity: 0.8;
}