/* 圖片載入狀態樣式 */
.js-product-image.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    min-height: 200px;
}

.js-product-image.loaded {
    animation: fade-in 0.3s ease-in;
}

.js-product-image.error {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 左側分類選單樣式 */
.category-sidebar.card {
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.category-sidebar .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.category-sidebar .list-group-item {
    border: 0;
    padding: 0.65rem 0.75rem;
    color: #343a40;
    background: transparent;
}

.category-sidebar .list-group-item:hover {
    background-color: #f8f9fa;
}

.category-sidebar .list-group-item.is-active,
.category-sidebar .list-group-item.active {
    background-color: #f1f3f5;
    font-weight: 600;
    border-left: 3px solid #212529;
}

.category-sidebar .collapse .list-group-item {
    padding-left: 1.25rem;
}

.category-sidebar a[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.category-sidebar .bi-chevron-down {
    transition: transform 0.2s ease;
}

.text-inherit {
    color: inherit;
}

.list-products-subcategory {
    padding-left: 2.25rem;
}

.eshop-group-buy-link {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 3px solid #667eea;
}

.eshop-disabled-link {
    pointer-events: none;
    opacity: 0.5;
}

.eshop-hidden {
    display: none;
}

.eshop-auth-btn {
    font-size: 1.1rem;
    font-weight: 600;
}

.eshop-icon-lg {
    font-size: 1.25rem;
}

.eshop-first-order-card {
    border: 2px solid #0d6efd;
    border-radius: 10px;
    overflow: hidden;
    background: #e7f1ff;
}

.eshop-first-order-card-header {
    background: #0d6efd;
    color: #fff;
    padding: 0.6rem 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eshop-first-order-card-body {
    padding: 1rem 0.9rem;
    color: #0d6efd;
    font-weight: 600;
}

.eshop-first-order-note {
    font-size: 0.95rem;
}

.eshop-first-order-strong {
    font-size: 1.15rem;
}

@media (min-width: 992px) {
    .category-sticky {
        position: sticky;
        top: 1rem;
    }
}

/* Mobile 產品清單 Apple 風格 */
@media (max-width: 991.98px) {
    .eshop-search-container .input-group {
        height: 4rem;
    }

    .eshop-search-container .input-group-text,
    .eshop-search-container .eshop-search-input,
    .eshop-search-container .eshop-search-clear {
        height: 100%;
        font-size: 1rem;
    }

    #mobileProductAccordion .accordion-collapse.show {
        position: fixed;
        inset: 0;
        z-index: 1055;
        background: #fff;
        padding: 64px 24px 32px;
        overflow-y: auto;
    }

    .mobile-product-close {
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 1060;
        border: 0;
        background: transparent;
        color: #000;
        font-size: 1.75rem;
        display: none;
    }

    #mobileProductAccordion .accordion-collapse.show ~ .mobile-product-close {
        display: block;
    }

    #mobileProductAccordion .accordion-button {
        font-size: 1.5rem;
        font-weight: 700;
        padding: 1rem;
        height: 4rem;
    }

    #mobileProductAccordion .list-group-item {
        border-bottom: 1px solid #e9ecef;
    }

    #mobileProductAccordion .list-group-item:last-child {
        border-bottom: none;
    }

    #mobileProductAccordion .list-group-item button {
        font-size: 1.75rem;
        font-weight: 700;
        padding: 1rem 0.5rem;
        border: 0;
        background: transparent;
        color: #212529;
    }

    #mobileProductAccordion .list-group-item button:hover {
        background-color: #f8f9fa;
    }

    #mobileProductAccordion .list-group-item button .bi-chevron-down {
        font-size: 1.5rem;
        transition: transform 0.2s ease;
    }

    #mobileProductAccordion .list-group-item button[aria-expanded="true"] .bi-chevron-down {
        transform: rotate(180deg);
    }

    #mobileProductAccordion .collapse .py-2 {
        padding: 0.5rem 0 !important;
    }

    #mobileProductAccordion .collapse a {
        font-size: 1.5rem;
        font-weight: 600;
        padding: 0.75rem 1rem;
        text-decoration: none;
        color: #212529;
        display: block;
        transition: background-color 0.2s ease;
    }

    #mobileProductAccordion .collapse a:hover {
        background-color: #f8f9fa;
    }

    #mobileProductAccordion .collapse a.fw-semibold {
        font-weight: 700;
        color: #0d6efd;
        background-color: #f1f3f5;
    }

    .mobile-subview {
        display: none;
    }

    .mobile-subview.active {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1056;
        background: #fff;
        padding: 64px 24px 32px;
        overflow-y: auto;
    }

    .mobile-subview-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: #212529;
        background: transparent;
        border: 0;
        padding: 0.5rem;
        margin-bottom: 1rem;
        cursor: pointer;
    }

    .mobile-subview-back:hover {
        opacity: 0.7;
    }

    .mobile-subview-back i {
        font-weight: 600;
    }

    .mobile-subview-title {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
        color: #212529;
    }

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

    .mobile-subview-list a {
        font-size: 1.5rem;
        font-weight: 600;
        padding: 0.75rem 0;
        text-decoration: none;
        color: #212529;
        display: block;
        transition: color 0.2s ease;
    }

    .mobile-subview-list a:hover {
        color: #0d6efd;
    }

    .mobile-subview-list a.active {
        font-weight: 700;
        color: #0d6efd;
    }
}

/* 個人專屬區塊 */
.personal-exclusive-card {
    border: 2px solid #ff4d4f;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.15);
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    margin-bottom: 1rem;
}

.personal-exclusive-card .card-header {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
}

.personal-exclusive-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    text-decoration: none;
    color: #ff4d4f;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.personal-exclusive-link:hover {
    background-color: #fff1f0;
    color: #d43f3f;
}

.personal-exclusive-link.active {
    background-color: #ffe7e6;
    font-weight: 700;
}

.personal-exclusive-icon {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* 產品卡片 */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.product-img-wrapper {
    background-color: #f8f9fa;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-title {
    color: #212529;
    font-weight: 500;
    line-height: 1.35;
    min-height: 3.2em;
}

.product-price {
    color: #ff4d4f;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

/* 電洽產品價格標籤 */
.product-price-contact {
    color: #0d6efd;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #e7f1ff 0%, #cfe2ff 100%);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #0d6efd;
}

.action-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.action-add {
    background-color: var(--bs-success);
    color: #fff;
}

.action-add:hover {
    background-color: #157347;
}

.action-fav {
    background-color: var(--bs-secondary-bg, #e9ecef);
    color: var(--bs-secondary, #6c757d);
}

.action-fav:hover {
    background-color: #dee2e6;
}

.action-circle i {
    font-size: 1.35rem;
}

.shop-nav .list-group-item.active {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.shop-nav .list-group-item.active i,
.shop-nav .list-group-item.active a {
    color: #fff !important;
}

.page-guide-section {
    margin-bottom: 1.5rem;
}

.page-breadcrumb {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 600;
}

.breadcrumb-separator {
    color: #adb5bd;
    font-weight: 400;
    user-select: none;
}

.breadcrumb-item i {
    font-size: 1rem;
}

@media (max-width: 991.98px) {
    .page-breadcrumb {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    .breadcrumb-item i {
        font-size: 0.9rem;
    }
}
