/* Apple Style Theme - Minimalist & SEO Optimized (v3 Final Fix) */
:root {
    --apple-bg: #f5f5f7;
    --apple-card-bg: #ffffff;
    --apple-text: #1d1d1f;
    --apple-text-secondary: #86868b;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-radius: 12px;
    --apple-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

body {
    background-color: var(--apple-bg) !important;
    color: var(--apple-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar-apple {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-apple .nav-link {
    color: var(--apple-text) !important;
    font-size: 13px;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.2s;
}

.navbar-apple .nav-link:hover {
    color: var(--apple-blue) !important;
}

.shop-name {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #000;
}

/* Buttons */
.btn-apple {
    border-radius: 980px;
    /* Pill shape */
    padding: 6px 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0, 0, 0.5, 1);
}

.btn-primary,
.btn-dark {
    background-color: #000 !important;
    border-color: #000 !important;
}

.btn-primary:hover,
.btn-dark:hover {
    background-color: #333 !important;
    transform: scale(1.02);
}

/* Contact Strip */
.contact-strip {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 13px;
    color: var(--apple-text-secondary);
    text-align: center;
}

.contact-strip strong {
    color: #000;
}

/* Hero Section */
.hero-section {
    padding: 80px 0 60px;
    text-align: center;
    background: #fff;
    margin-bottom: 30px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 10px;
    color: #1d1d1f;
}

.hero-subtitle {
    font-size: 20px;
    color: #86868b;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* ==========================================================================
   NUCLEAR GRID FIX (Manual Overrides for Layout)
   ========================================================================== */
.apple-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -10px !important;
    margin-left: -10px !important;
    padding: 20px 0;
    width: auto !important;
}

/* Force direct children (the anchors) to behave as columns regardless of other styles */
.apple-grid>a {
    display: block !important;
    position: relative;

    /* RESET BOOTSTRAP INTERFERENCE */
    flex: 0 0 auto !important;
    max-width: none !important;

    width: 100% !important;
    /* Mobile First: 1 full column */
    padding-right: 10px !important;
    padding-left: 10px !important;
    margin-bottom: 24px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    color: inherit;
    min-width: 0 !important;
}

/* Tablet (md): 2 columns */
@media (min-width: 768px) {
    .apple-grid>a {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* Desktop (lg): 4 columns */
@media (min-width: 992px) {
    .apple-grid>a {
        width: 25% !important;
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}

/* ACG Card Style */
.acg-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    /* Ensure card itself has width */
    width: 100%;
}

.acg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.08);
}

.acg-thumb {
    width: 100%;
    height: 160px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    display: block !important;
    /* Force display */
}

.acg-card .p-3 {
    padding: 20px !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.goods-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 45px;
}

.price {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
}

.stat-bottom {
    font-size: 12px;
    color: #86868b;
    margin-top: 5px;
}

.badge-soft-success {
    display: inline-block;
    background-color: rgba(52, 199, 89, 0.1);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Item Detail */
.item-layout {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    margin-top: 30px;
}

.item-left img {
    border-radius: 12px;
    width: 100%;
}

.item-right h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.item-price {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 20px;
}

/* Category Switcher */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Added border for better definition */
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    color: #1d1d1f;
    transition: all 0.2s;
    text-decoration: none !important;
    /* Force remove underline */
    white-space: nowrap;
    /* Prevent text wrapping */
}

.chip:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #000;
}

.chip.is-primary {
    background: #1d1d1f;
    color: #fff;
    border-color: #1d1d1f;
}


/* Pay List Icons Fix - STRICT MODE */
.pay-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.pay-list .pay {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
    text-decoration: none !important;
}

.pay-list .pay:hover,
.pay-list .pay.active {
    border-color: #0071e3;
    background: rgba(0, 113, 227, 0.05);
}

/* Target both the container image AND any inline image */
.pay-list .pay img,
.pay-list img {
    width: 24px !important;
    /* Force fixed width */
    height: 24px !important;
    /* Force fixed height */
    min-width: 24px !important;
    max-width: 24px !important;
    object-fit: contain;
    /* Maintain aspect ratio */
    border-radius: 4px;
    margin: 0 !important;
    /* Remove any default margins */
    display: block;
    /* Ensure no inline spacing */
}

.pay-list .pay span {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    margin-left: 5px;
}

/* Footer */
footer {
    background: #f5f5f7;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    font-size: 12px;
    color: #86868b;
}

/* Form inputs */
.form-control {
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #d2d2d7;
}

.form-control:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}