/* ============================================
   PNX FUNDING - Common CSS
   Tumblbug-inspired clean minimal design
   ============================================ */

/* Pretendard Font */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #1c1c1c;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul, li {
    list-style: none;
}

img {
    max-width: 100%;
    vertical-align: middle;
}

input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
}

/* Layout */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.header-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo a {
    font-size: 22px;
    font-weight: 700;
    color: #1c1c1c;
    letter-spacing: -0.5px;
}

.search-box form {
    display: flex;
}

.search-box input[type="text"] {
    width: 280px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #f0f0f0;
    font-size: 14px;
    color: #1c1c1c;
    transition: all 0.2s;
}

.search-box input[type="text"]:focus {
    outline: none;
    background: #e8e8e8;
}

.search-box input[type="text"]::placeholder {
    color: #9e9e9e;
}

.search-box button {
    padding: 10px 16px;
    background: #1c1c1c;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    transition: background 0.2s;
}

.search-box button:hover {
    background: #3d3d3d;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-menu a {
    color: #6d6d6d;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.user-menu a:hover {
    color: #1c1c1c;
    background: #f8f8f8;
}

.cart-link {
    position: relative;
}

.cart-count {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 3px;
    background: #f86453;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
}

/* ============================================
   Navigation
   ============================================ */
.main-nav {
    border-top: 1px solid #f0f0f0;
}

.nav-menu {
    display: flex;
    justify-content: center;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: block;
    padding: 14px 20px;
    font-weight: 500;
    font-size: 15px;
    color: #3d3d3d;
    transition: color 0.2s;
}

.nav-item:hover > a {
    color: #f86453;
    font-weight: 700;
}

.nav-item.has-sub:hover .sub-menu {
    display: block;
}

.nav-gift-card > a {
    color: #f86453 !important;
    font-weight: 700 !important;
}

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 150px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    z-index: 100;
    overflow: hidden;
}

.sub-menu li a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: #3d3d3d;
}

.sub-menu li a:hover {
    background: #f8f8f8;
    color: #f86453;
}

/* ============================================
   Main Content
   ============================================ */
.site-content {
    min-height: calc(100vh - 300px);
    padding-top: 32px;
    padding-bottom: 40px;
}

/* ============================================
   Mypage Layout
   ============================================ */
.mypage-wrap {
    display: flex;
    gap: 32px;
}
.mypage-sidebar {
    width: 200px;
    flex-shrink: 0;
}
.member-info-box {
    padding: 20px;
    background: #1c1c1c;
    color: #fff;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 16px;
}
.mypage-menu {
    list-style: none;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}
.mypage-menu li a {
    display: block;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #3d3d3d;
    font-size: 14px;
    transition: all 0.2s;
}
.mypage-menu li:last-child a {
    border-bottom: none;
}
.mypage-menu li.active a,
.mypage-menu li a:hover {
    background: #f8f8f8;
    font-weight: 600;
    color: #1c1c1c;
}
.mypage-content {
    flex: 1;
    min-width: 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    margin-top: 48px;
    padding: 36px 0;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-info {
    margin-bottom: 16px;
    color: #6d6d6d;
}

.footer-info .company-name {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1c;
    margin-bottom: 8px;
}

.footer-info p {
    font-size: 13px;
    line-height: 1.8;
}

.footer-links {
    margin-bottom: 16px;
}

.footer-links a {
    margin: 0 10px;
    color: #6d6d6d;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #1c1c1c;
}

.copyright {
    color: #9e9e9e;
    font-size: 11px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #1c1c1c;
    color: #fff;
}

.btn-primary:hover {
    background: #3d3d3d;
}

.btn-secondary {
    background: #fff;
    color: #1c1c1c;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

.btn-danger {
    background: #f86453;
    color: #fff;
}

.btn-danger:hover {
    background: #e5544a;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #1c1c1c;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #1c1c1c;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #1c1c1c;
}

.form-control::placeholder {
    color: #9e9e9e;
}

.form-control.error {
    border-color: #f86453;
}

.error-msg {
    color: #f86453;
    font-size: 12px;
    margin-top: 5px;
}

.success-msg {
    color: #27ae60;
    font-size: 12px;
    margin-top: 5px;
}

/* ============================================
   Tables
   ============================================ */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table th {
    background: #f8f8f8;
    font-weight: 600;
    font-size: 13px;
    color: #6d6d6d;
}

.table tbody tr:hover {
    background: #fafafa;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* ============================================
   Product Grid
   ============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.product-card .product-image {
    position: relative;
    padding-top: 100%;
    background: #f5f5f5;
}

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

.product-card .product-info {
    padding: 16px;
}

.product-card .product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1c1c1c;
}

.product-card .product-price {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1c;
}

.product-card .original-price {
    color: #9e9e9e;
    text-decoration: line-through;
    font-size: 12px;
    font-weight: normal;
}

.product-card .discount-rate {
    color: #f86453;
    font-size: 14px;
    font-weight: 700;
    margin-left: 5px;
}

/* ============================================
   Project Grid & Cards
   ============================================ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.project-card {
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease-in-out;
    background: #fff;
    border: none;
}

.project-card:hover {
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.project-card .project-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.project-card .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card .project-info {
    padding: 16px;
}

.project-card .project-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.project-card .progress-bar {
    background: #f0f0f0;
    border-radius: 3px;
    height: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.project-card .progress-fill {
    background: #f86453;
    height: 100%;
    border-radius: 3px;
}

/* ============================================
   Project Detail
   ============================================ */
.detail-top {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.detail-top .detail-image {
    flex: 1;
    max-width: 580px;
}

.detail-top .detail-info {
    flex: 1;
    max-width: 460px;
}

.detail-bottom {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.detail-bottom .detail-left {
    flex: 1;
    min-width: 0;
}

.detail-bottom .detail-right {
    width: 340px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* ============================================
   Filter Area
   ============================================ */
.filter-area .filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #6d6d6d;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

.pagination .active {
    background: #1c1c1c;
    color: #fff;
    border-color: #1c1c1c;
    font-weight: 600;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ============================================
   Page Title
   ============================================ */
.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #1c1c1c;
    letter-spacing: -0.025em;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
    padding: 12px 0;
    color: #9e9e9e;
    font-size: 13px;
}

.breadcrumb a {
    color: #6d6d6d;
}

.breadcrumb a:hover {
    color: #1c1c1c;
}

.breadcrumb span {
    margin: 0 8px;
}

/* ============================================
   Utility
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.hidden { display: none !important; }

/* Price Format */
.price {
    font-weight: 700;
    color: #1c1c1c;
}

.price-large {
    font-size: 24px;
}

/* Rating Stars */
.rating {
    color: #f39c12;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.badge-new {
    background: #f86453;
    color: #fff;
}

.badge-sale {
    background: #f86453;
    color: #fff;
}

.badge-best {
    background: #f39c12;
    color: #fff;
}

.badge-soldout {
    background: #9e9e9e;
    color: #fff;
}

/* ============================================
   Mobile Hamburger Menu
   ============================================ */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    color: #1c1c1c;
}

/* ============================================
   Mobile Bottom CTA (Detail Page)
   ============================================ */
.mobile-bottom-cta {
    display: none;
}

/* ============================================
   Table responsive wrapper
   ============================================ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   Tablet: 768px ~ 1024px
   ============================================ */
@media screen and (max-width: 1024px) {
    .product-grid,
    .project-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px !important;
    }

    .detail-top {
        gap: 24px;
    }

    .detail-top .detail-image {
        max-width: 50%;
    }

    .detail-top .detail-info {
        max-width: 50%;
    }

    .detail-bottom .detail-right {
        width: 280px;
    }
}

/* ============================================
   Mobile: ~768px
   ============================================ */
@media screen and (max-width: 768px) {

    /* ---- Header ---- */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        border-bottom: none;
        box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    }

    .header-inner {
        padding: 0 16px;
    }

    .header-top {
        flex-wrap: wrap;
        gap: 0;
        padding: 10px 0;
        align-items: center;
    }

    .header-top .logo {
        order: 1;
        flex: 1;
    }

    .logo a {
        font-size: 18px;
        font-weight: 700;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 2;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 20px;
        color: #1c1c1c;
        transition: background 0.15s;
    }

    .mobile-menu-btn:active {
        background: #f0f0f0;
    }

    .header-top .search-box {
        order: 3;
        width: 100%;
        margin-top: 8px;
    }

    .search-box input[type="text"] {
        width: 100% !important;
        min-width: 0;
        padding: 10px 14px;
        border-radius: 8px 0 0 8px;
        background: #f0f0f0;
        border: none;
        font-size: 14px;
    }

    .search-box input[type="text"]:focus {
        background: #e8e8e8;
    }

    .search-box button {
        padding: 10px 14px;
        border-radius: 0 8px 8px 0;
        background: #1c1c1c;
        font-size: 13px;
    }

    .search-box form {
        width: 100%;
    }

    .header-top .user-menu {
        order: 4;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0;
        font-size: 13px;
        padding: 8px 0 0;
        margin-top: 8px;
        border-top: 1px solid #f0f0f0;
    }

    .user-menu a {
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 13px;
        color: #6d6d6d;
    }

    .user-menu a:active {
        background: #f0f0f0;
    }

    .user-menu .user-name {
        font-weight: 600;
        color: #1c1c1c;
    }

    .btn-create-project {
        padding: 7px 14px !important;
        border-radius: 20px !important;
        font-size: 12px !important;
        margin-left: 4px !important;
        background: #f86453 !important;
    }

    .btn-create-project:active {
        background: #e5544a !important;
    }

    /* ---- Navigation ---- */
    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-top: 1px solid #f0f0f0;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-menu {
        flex-wrap: nowrap;
        justify-content: flex-start;
        min-width: max-content;
        gap: 0;
        padding: 0 16px;
    }

    .nav-item > a {
        padding: 12px 14px;
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
        color: #6d6d6d;
        transition: color 0.2s, font-weight 0.2s;
    }

    .nav-item > a:active,
    .nav-item:hover > a {
        color: #f86453;
        font-weight: 700;
    }

    /* Mobile Nav Toggle */
    .main-nav.mobile-hidden {
        display: none;
    }

    /* ---- Content ---- */
    .site-content {
        padding-top: 20px;
        padding-bottom: 24px;
    }

    .container {
        padding: 0 16px;
    }

    /* ---- Project Grid ---- */
    .product-grid,
    .project-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .project-card {
        border-radius: 8px;
    }

    .project-card .project-image,
    .project-card > a > div:first-child {
        height: auto !important;
        aspect-ratio: 4 / 3;
    }

    .project-card .project-info,
    .project-card > a > div:last-child {
        padding: 12px !important;
    }

    .project-card .project-info p[style*="font-size:15px"],
    .project-card > a > div:last-child > p:first-child {
        font-size: 14px !important;
        height: 38px !important;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 14px !important;
    }

    .section-header h2,
    .project-section h2 {
        font-size: 18px !important;
        font-weight: 700 !important;
        letter-spacing: -0.025em;
    }

    .project-section {
        margin-bottom: 36px !important;
    }

    .section-header a[style*="color:#666"],
    .section-header a[style*="font-size:14px"] {
        font-size: 13px !important;
        color: #9e9e9e !important;
    }

    /* ---- Mypage ---- */
    .mypage-wrap {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .mypage-wrap > aside,
    .mypage-sidebar {
        width: 100% !important;
        flex-shrink: 1 !important;
    }

    .member-info-box {
        padding: 16px;
        border-radius: 12px;
        font-size: 14px;
    }

    .mypage-menu {
        display: flex;
        overflow-x: auto;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background: #fff;
    }

    .mypage-menu::-webkit-scrollbar {
        display: none;
    }

    .mypage-menu li a {
        white-space: nowrap;
        border-bottom: 2px solid transparent;
        border-right: none;
        padding: 12px 16px;
        font-size: 14px;
        color: #9e9e9e;
        font-weight: 500;
        transition: all 0.2s;
    }

    .mypage-menu li:last-child a {
        border-right: none;
    }

    .mypage-menu li.active a,
    .mypage-menu li a:hover {
        color: #1c1c1c;
        font-weight: 700;
        border-bottom-color: #1c1c1c;
        background: transparent;
    }

    /* ---- Project Detail ---- */
    .detail-top {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .detail-top .detail-image,
    .detail-top > div:first-child {
        max-width: 100% !important;
        flex: none !important;
    }

    .detail-top .detail-info,
    .detail-top > div:last-child {
        max-width: 100% !important;
        flex: none !important;
        padding-top: 16px;
    }

    .detail-bottom {
        flex-direction: column !important;
        gap: 24px !important;
    }

    .detail-bottom .detail-right,
    .detail-bottom > div:last-child {
        width: 100% !important;
        position: static !important;
    }

    /* ---- Tables ---- */
    .table {
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 12px 10px;
    }

    /* ---- Page Title ---- */
    .page-title {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    /* ---- Footer ---- */
    .site-footer {
        margin-top: 32px;
        padding: 24px 0;
        border-top: 1px solid #f0f0f0;
    }

    .footer-info {
        margin-bottom: 12px;
    }

    .footer-info .company-name {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .footer-info p {
        font-size: 11px;
        line-height: 1.8;
        color: #9e9e9e;
    }

    .footer-links {
        margin-bottom: 12px;
    }

    .footer-links a {
        margin: 0 6px;
        font-size: 12px;
        color: #6d6d6d;
    }

    .copyright {
        font-size: 10px;
    }

    /* ---- Buttons ---- */
    .btn {
        padding: 12px 20px;
        border-radius: 8px;
        font-size: 14px;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 15px;
        border-radius: 8px;
    }

    .btn-block {
        border-radius: 8px;
    }

    /* ---- Filter area ---- */
    .filter-area {
        padding: 16px !important;
        border-radius: 12px !important;
        margin-bottom: 20px !important;
        background: #f8f8f8 !important;
        border: none !important;
    }

    .filter-area .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px !important;
    }

    .filter-area .filter-row > div:first-child {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
        scrollbar-width: none;
        gap: 6px !important;
        margin: 0 -16px;
        padding: 0 16px 6px;
    }

    .filter-area .filter-row > div:first-child::-webkit-scrollbar {
        display: none;
    }

    .filter-area .filter-row > div:first-child a {
        flex-shrink: 0;
        border-radius: 40px !important;
        padding: 8px 16px !important;
        font-size: 13px !important;
        font-weight: 500;
        border: 1px solid #e0e0e0 !important;
        transition: all 0.2s;
    }

    .filter-area select {
        width: 100%;
        padding: 11px 14px !important;
        border-radius: 8px !important;
        border: 1px solid #e0e0e0 !important;
        font-size: 14px !important;
        background: #fff;
        color: #1c1c1c;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236d6d6d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
    }

    /* ---- Tabs ---- */
    .detail-tabs {
        margin: 0 -16px !important;
        padding: 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .detail-tabs ul {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
        scrollbar-width: none;
        gap: 0 !important;
        padding: 0 16px;
    }

    .detail-tabs ul::-webkit-scrollbar {
        display: none;
    }

    .detail-tabs .tab-link {
        padding: 14px 16px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* ---- Login/Forms ---- */
    .login-wrap {
        margin: 16px auto !important;
        padding: 24px 20px !important;
        border: none !important;
        box-shadow: none !important;
    }

    .form-control {
        padding: 13px 14px;
        border-radius: 8px;
        font-size: 15px;
        border-color: #e0e0e0;
    }

    .form-group label {
        font-size: 13px;
        color: #6d6d6d;
        margin-bottom: 6px;
    }

    /* ---- Pagination ---- */
    .pagination {
        gap: 4px;
        margin-top: 24px;
    }

    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 13px;
        border-color: #e0e0e0;
    }

    /* ---- Mobile Bottom CTA ---- */
    .mobile-bottom-cta {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #f0f0f0;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
        z-index: 999;
    }

    .mobile-bottom-cta .cta-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 48px;
        background: #1c1c1c;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 700;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        transition: background 0.15s;
    }

    .mobile-bottom-cta .cta-btn:active {
        background: #3d3d3d;
    }

    /* Add bottom padding when CTA is present */
    body.has-bottom-cta {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    /* ---- Cards ---- */
    .card {
        border-radius: 12px;
        border-color: #f0f0f0;
    }

    .card-header {
        padding: 14px 16px;
        font-size: 14px;
    }

    .card-body {
        padding: 16px;
    }

    /* ---- Alerts ---- */
    .alert {
        border-radius: 8px;
        padding: 14px 16px;
        font-size: 13px;
    }

    /* ---- Reward Cards (Detail Page) ---- */
    .reward-card {
        border-radius: 8px !important;
        padding: 16px !important;
        border-color: #f0f0f0 !important;
    }

    /* ---- Breadcrumb ---- */
    .breadcrumb {
        font-size: 12px;
        padding: 8px 0;
    }
}

/* ============================================
   Small Mobile: ~480px
   ============================================ */
@media screen and (max-width: 480px) {
    body {
        font-size: 13px;
        -webkit-text-size-adjust: 100%;
    }

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

    .logo a {
        font-size: 16px;
    }

    /* Product / Project Grid - single column */
    .product-grid,
    .project-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .project-card .project-image,
    .project-card > a > div:first-child {
        aspect-ratio: 16 / 10;
    }

    .project-card .project-info,
    .project-card > a > div:last-child {
        padding: 14px !important;
    }

    /* Forms */
    .form-control {
        padding: 14px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    /* Price */
    .price-large {
        font-size: 20px;
    }

    /* Page Title */
    .page-title {
        font-size: 18px;
        letter-spacing: -0.025em;
    }

    /* Pagination */
    .pagination a,
    .pagination span {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .container {
        padding: 0 12px;
    }

    /* Search */
    .search-box input[type="text"] {
        padding: 9px 12px;
        font-size: 13px;
    }

    .search-box button {
        padding: 9px 12px;
        font-size: 12px;
    }

    /* User menu compact */
    .header-top .user-menu {
        gap: 0;
        font-size: 12px;
    }

    .user-menu a {
        padding: 6px 8px;
        font-size: 12px;
    }

    /* Section */
    .section-header h2,
    .project-section h2 {
        font-size: 16px !important;
    }

    /* Nav */
    .nav-menu {
        padding: 0 12px;
    }

    .nav-item > a {
        padding: 10px 12px;
        font-size: 13px;
    }
}
