/* ===========================================
   NIBANGO WEB - COMPONENTS
   Premium minimalist system
   =========================================== */

/* ========== Logo ========== */
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.85;
}

.logo-text {
    font-family: var(--font-family-logo);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.logo-niban {
    color: var(--logo-niban);
}

.logo-go {
    color: var(--logo-go);
}

/* ========== Header (Bento Floating) ========== */
.header {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 72px;
    background: var(--glass-background);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    z-index: var(--z-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow-bento);
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Header Content Alignment */
.header__left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* In-Header Search (Minimalist) */
.header-search {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 44px;
    background: var(--color-background-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    width: 400px;
}

.header-search:focus-within {
    background: var(--color-background-secondary);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(90, 82, 229, 0.1);
}

.header-search input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    margin-left: 8px;
    font-family: inherit;
    font-size: var(--font-size-small);
    color: var(--color-text-primary);
}

/* Location Pill (Floating Style) */
.location-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-mini);
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-pill:hover {
    background: var(--color-background-tertiary);
    border-color: var(--grey-300);
}

/* ========== Category Pills ========== */
.category-pills {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.category-pill {
    padding: 10px 24px;
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
}

.category-pill:hover {
    border-color: var(--grey-300);
    color: var(--color-text-primary);
    transform: translateY(-1px);
}

.category-pill.active {
    background: var(--grey-900);
    color: white;
    border-color: var(--grey-900);
    box-shadow: var(--shadow-md);
}

/* ========== Product Card (The Hero) ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--grid-gap);
    padding: 32px 0;
}

.product-card {
    background: var(--color-background-secondary);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-bento);
    border-color: var(--grey-300);
}

.product-card__image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.08);
}

.product-card__overlay-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--grey-800);
    box-shadow: var(--shadow-sm);
}

.product-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-card__title {
    font-size: var(--font-size-body);
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__price {
    font-size: var(--font-size-body);
    font-weight: 700;
    color: var(--brand-primary);
}

.product-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--font-size-mini);
    color: var(--color-text-tertiary);
}

.product-card__meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-card__footer {
    border-top: 1px solid var(--color-border-light);
    margin-top: 12px;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card__seller {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-card__avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--color-background-tertiary);
}

.product-card__seller-name {
    font-size: var(--font-size-mini);
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* ========== Tab Bar (Mobile Floating) ========== */
.tab-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 400px;
    height: 72px;
    background: var(--glass-background);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-bento);
    z-index: var(--z-tab-bar);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 12px;
}

.tab-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--color-text-tertiary);
    transition: all 0.2s ease;
    flex: 1;
}

.tab-bar__item.active {
    color: var(--brand-primary);
}

.tab-bar__item svg {
    width: 24px;
    height: 24px;
}

.tab-bar__label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Center Add Button in Tab Bar */
.tab-bar__item--add .tab-bar__btn-inner {
    width: 48px;
    height: 48px;
    background: var(--brand-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 16px rgba(90, 82, 229, 0.3);
    margin-top: -30px;
    border: 4px solid var(--color-background);
}

/* ========== Section Containers ========== */
.section {
    padding: 120px 0 60px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ========== Buttons ========== */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-small);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--brand-secondary);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.btn-secondary:hover {
    background: var(--color-background-tertiary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .header {
        top: 12px;
        left: 12px;
        right: 12px;
        height: 64px;
        padding: 0 16px;
    }

    .header-search {
        display: none;
    }

    /* Hide search in header on mobile */
    .logo-text {
        font-size: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        border-radius: var(--radius-xl);
    }

    .product-card__content {
        padding: 12px;
        gap: 4px;
    }

    .product-card__title {
        font-size: 14px;
    }

    .product-card__price {
        font-size: 14px;
    }
}