/**
 * WARRET Main Stylesheet
 * Clean, Professional Design
 */

:root {
    --primary: #C41E7A;
    --primary-dark: #A01862;
    --primary-light: #E85AA8;
    --primary-bg: #FDF2F8;
    --secondary: #6B7280;
    --dark: #1F2937;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--gray-100);
    color: var(--dark);
    font-size: 15px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--gray-700);
    color: white;
    font-size: 14px;
    padding: 6px 0;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.top-bar a:hover {
    color: white;
}

/* ===== HEADER ===== */
.main-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    padding: 12px 0;
}

.logo-img {
    height: 32px;
}

/* Search Box */
.search-box {
    flex: 1;
    max-width: 550px;
    min-width: 200px;
    position: relative;
}

.search-box .input-group {
    border: 2px solid var(--primary);
    border-radius: 6px;
    overflow: hidden;
}

.search-box .form-control {
    border: none;
    padding: 8px 14px;
    font-size: 14px;
}

.search-box .form-control:focus {
    box-shadow: none;
}

.search-box .btn-search {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 16px;
    font-size: 16px;
}

.search-box .btn-search:hover {
    background: var(--primary-dark);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 6px 6px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 4px;
}

.header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--gray-600);
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
}

.header-action:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.header-action i {
    font-size: 18px;
    margin-bottom: 2px;
}

.header-action.primary-action {
    background: var(--primary);
    color: white;
}

.header-action.primary-action:hover {
    background: var(--primary-dark);
    color: white;
}

.header-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.badge-notify {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* ===== CATEGORY NAV ===== */
.category-nav {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
    overflow-x: auto;
}

.category-nav .nav {
    flex-wrap: nowrap;
}

.category-nav .nav-link {
    color: var(--gray-700);
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-nav .nav-link:hover {
    color: var(--primary);
    background: var(--primary-bg);
    border-bottom-color: var(--primary);
}

.category-nav .nav-link i {
    margin-right: 4px;
}

/* ===== ANNOUNCEMENT BAR ===== */
.announcement-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.announcement-bar a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
}

/* ===== MAIN LAYOUT ===== */
.main-content {
    padding: 16px 0;
}

/* ===== SIDEBAR ===== */
.sidebar-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    overflow: hidden;
}

.sidebar-header {
    background: var(--gray-50);
    padding: 10px 14px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--dark);
}

.sidebar-header i {
    color: var(--primary);
    margin-right: 6px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li a {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    color: var(--gray-700);
    font-size: 14px;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s;
}

.category-list li a:hover {
    background: var(--primary-bg);
    color: var(--primary);
    padding-left: 18px;
}

.category-list li a i {
    width: 18px;
    margin-right: 8px;
    color: var(--gray-400);
    font-size: 14px;
}

.category-list li a:hover i {
    color: var(--primary);
}

.category-list li a .count {
    margin-left: auto;
    background: var(--gray-100);
    color: var(--gray-500);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}

/* ===== BANNER SLIDER ===== */
.banner-section {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 16px;
}

.carousel-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 12px 20px;
}

.carousel-caption h5 {
    font-size: 18px;
    margin-bottom: 4px;
}

.carousel-caption p {
    font-size: 14px;
    margin-bottom: 0;
}

.carousel-control-prev,
.carousel-control-next {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
    box-shadow: var(--shadow-md);
}

.carousel-control-prev {
    left: 12px;
}

.carousel-control-next {
    right: 12px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) grayscale(100%);
    width: 14px;
    height: 14px;
}

.default-banner {
    background: linear-gradient(135deg, var(--primary-bg) 0%, white 100%);
    border-radius: 8px;
}

/* ===== HOT ITEMS SIDEBAR ===== */
.hot-item {
    display: flex;
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.hot-item:hover {
    background: var(--gray-50);
}

.hot-item:last-child {
    border-bottom: none;
}

.hot-item-img {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 10px;
    flex-shrink: 0;
}

.hot-item-info {
    flex: 1;
    min-width: 0;
}

.hot-item-title {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.hot-item-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
}

/* ===== RECOMMENDED SHOPS ===== */
.shop-mini {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.shop-mini:hover {
    background: var(--gray-50);
}

.shop-mini:last-child {
    border-bottom: none;
}

.shop-mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    flex-shrink: 0;
    border: 2px solid var(--gray-100);
}

.shop-mini-info {
    flex: 1;
    min-width: 0;
}

.shop-mini-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.shop-mini-meta {
    font-size: 14px;
    color: var(--gray-500);
}

.shop-mini-meta i {
    color: var(--warning);
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-200);
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--primary);
    margin-right: 8px;
    font-size: 18px;
}

.section-title .badge {
    margin-left: 8px;
    font-size: 10px;
    font-weight: 500;
}

.section-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

.section-link:hover {
    text-decoration: underline;
}

/* ===== PRODUCT GRID - 6 columns ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: white;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.product-image {
    position: relative;
    padding-top: 100%;
    background: var(--gray-100);
    overflow: hidden;
    display: block;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.badge-auction {
    background: var(--primary);
    color: white;
}

.badge-hot {
    background: var(--danger);
    color: white;
}

.badge-new {
    background: var(--success);
    color: white;
}

.product-timer {
    position: absolute;
    bottom: 6px;
    left: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-timer i {
    margin-right: 4px;
    font-size: 10px;
}

.product-body {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
    line-height: 1.4;
    text-decoration: none;
}

.product-title:hover {
    color: var(--primary);
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--gray-500);
}

.product-shop {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.product-shop img {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 4px;
}

.product-shop span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-bids {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.product-bids i {
    margin-right: 2px;
}

.product-price-section {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}

.price-label {
    font-size: 10px;
    color: var(--gray-500);
    margin-bottom: 1px;
}

.price-current {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.btn-bid {
    display: block;
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 7px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

.btn-bid:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-bid i {
    margin-right: 4px;
}

.btn-contact {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-contact:hover {
    background: var(--gray-200);
    color: var(--dark);
}

/* ===== CATEGORY SHOWCASE ===== */
.category-showcase {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 16px;
    margin-bottom: 16px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}

.category-item {
    text-align: center;
    padding: 12px 6px;
    border-radius: 6px;
    transition: all 0.2s;
    color: var(--gray-700);
    text-decoration: none;
}

.category-item:hover {
    background: var(--primary-bg);
    color: var(--primary);
    transform: translateY(-2px);
}

.category-icon {
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 20px;
    transition: all 0.2s;
}

.category-item:hover .category-icon {
    background: var(--primary);
    color: white;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
}

/* ===== TRUST BADGES ===== */
.trust-section {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 16px;
    margin-bottom: 16px;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.trust-item {
    text-align: center;
    padding: 12px;
}

.trust-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 22px;
    color: var(--primary);
}

.trust-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.trust-desc {
    font-size: 14px;
    color: var(--gray-500);
}

/* ===== TAGS SECTION ===== */
.tags-section {
    padding: 10px 12px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-item {
    padding: 4px 10px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
}

.tag-item:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* ===== FOOTER ===== */
.main-footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 32px 0 16px;
    margin-top: 32px;
}

.footer-section h5 {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: var(--gray-600);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--gray-200);
    padding-top: 16px;
    margin-top: 24px;
}

.footer-logo {
    height: 24px;
    margin-bottom: 8px;
}

.footer-copyright {
    font-size: 14px;
    color: var(--gray-500);
}

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray-500);
    font-size: 14px;
    padding: 4px 12px;
    text-decoration: none;
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--primary);
}

.mobile-nav-item.sell-btn {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin-top: -20px;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(196, 30, 122, 0.4);
}

.mobile-nav-item.sell-btn:hover {
    color: white;
    background: var(--primary-dark);
}

.mobile-nav-item.sell-btn i {
    font-size: 24px;
    margin-bottom: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .sidebar {
        display: none;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 10px !important;
    }

    .logo-img {
        height: 28px;
    }

    .search-box {
        order: 3;
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 4px;
    }

    .header-actions {
        margin-left: auto;
    }

    .header-action span {
        display: none;
    }

    .header-action {
        padding: 8px;
    }

    .header-action i {
        font-size: 20px;
        margin-bottom: 0;
    }

    .category-nav {
        display: none;
    }

    .announcement-bar {
        font-size: 14px;
        padding: 6px 0;
    }

    .carousel-item img {
        height: 180px;
    }

    .carousel-caption {
        display: none;
    }

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

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .category-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .category-name {
        font-size: 14px;
    }

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

    .trust-item {
        padding: 8px;
    }

    .trust-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .trust-title {
        font-size: 14px;
    }

    .trust-desc {
        font-size: 14px;
    }

    .main-footer {
        padding: 24px 0 16px;
    }

    .footer-row {
        text-align: center;
    }

    .footer-section {
        margin-bottom: 20px;
    }

    .footer-section h5 {
        margin-bottom: 10px;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }

    .footer-links li {
        margin-bottom: 0;
    }

    .footer-bottom {
        text-align: center;
    }

    .footer-bottom .row>div {
        text-align: center !important;
        margin-bottom: 10px;
    }

    .social-icons {
        justify-content: center;
        display: flex;
        margin-top: 10px;
    }

    .mobile-nav {
        display: block;
    }

    body {
        padding-bottom: 70px;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-body {
        padding: 8px;
    }

    .product-title {
        font-size: 14px;
        min-height: 30px;
    }

    .price-current {
        font-size: 14px;
    }

    .btn-bid {
        padding: 6px;
        font-size: 14px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .section-title {
        font-size: 14px;
    }
}