/**
 * 商品一覧・商品詳細ページ用スタイル
 *
 * @package OnlineClinic
 */

/* ==========================================================================
   Archive Header
   ========================================================================== */
.oc-archive-header {
    margin-bottom: var(--oc-space-xl);
}

.oc-archive-header__desc {
    color: var(--oc-text-light);
    font-size: var(--oc-font-size-base);
    margin-top: var(--oc-space-sm);
}

/* ==========================================================================
   Archive Layout (Sidebar + Content)
   ========================================================================== */
.oc-archive-layout {
    display: flex;
    flex-direction: column;
    gap: var(--oc-space-xl);
}

@media (min-width: 769px) {
    .oc-archive-layout {
        flex-direction: row;
    }

    .oc-archive-sidebar {
        width: 240px;
        flex-shrink: 0;
    }

    .oc-archive-content {
        flex: 1;
        min-width: 0;
    }
}

/* ==========================================================================
   Category Filter (Sidebar)
   ========================================================================== */
.oc-filter {
    display: none;
}

@media (min-width: 769px) {
    .oc-filter {
        display: block;
        position: sticky;
        top: calc(var(--oc-header-height) + var(--oc-space-lg));
    }
}

.oc-filter__title {
    font-size: var(--oc-font-size-base);
    font-weight: 700;
    margin-bottom: var(--oc-space-md);
    padding-bottom: var(--oc-space-sm);
    border-bottom: 2px solid var(--oc-accent);
}

.oc-filter__list {
    list-style: none;
}

.oc-filter__item {
    margin-bottom: 0;
}

.oc-filter__item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--oc-space-sm) var(--oc-space-md);
    color: var(--oc-text-light);
    font-size: var(--oc-font-size-sm);
    border-radius: var(--oc-border-radius);
    transition: all var(--oc-transition);
    text-decoration: none;
}

.oc-filter__item a:hover {
    background-color: var(--oc-accent-light);
    color: var(--oc-accent);
}

.oc-filter__item.is-active a {
    background-color: var(--oc-accent-light);
    color: var(--oc-accent);
    font-weight: 600;
}

.oc-filter__count {
    font-size: var(--oc-font-size-xs);
    color: var(--oc-text-muted);
}

/* Mobile Filter */
.oc-filter-mobile {
    display: block;
    margin-bottom: var(--oc-space-lg);
}

@media (min-width: 769px) {
    .oc-filter-mobile {
        display: none;
    }
}

/* ==========================================================================
   Product Grid (Archive)
   ========================================================================== */
.oc-product-grid {
    margin-bottom: var(--oc-space-xl);
}

@media (min-width: 769px) {
    .oc-product-grid.oc-grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .oc-product-grid.oc-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .oc-product-grid.oc-grid--3 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Product Card
   ========================================================================== */
.oc-product-card {
    display: flex;
    flex-direction: column;
}

.oc-product-card__link {
    display: block;
    flex: 1;
    text-decoration: none;
    color: var(--oc-text);
}

.oc-product-card__link:hover {
    color: var(--oc-text);
}

.oc-product-card__actions {
    padding: 0 var(--oc-space-lg) var(--oc-space-lg);
}

.oc-card__image--placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--oc-border-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 24 24' fill='none' stroke='%23CCCCCC' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 48px 48px;
}

.oc-card__price-original {
    font-size: var(--oc-font-size-sm);
    color: var(--oc-text-muted);
    margin-right: var(--oc-space-sm);
}

.oc-card__body .oc-badge {
    margin-bottom: var(--oc-space-sm);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.oc-pagination {
    margin-top: var(--oc-space-xl);
}

.oc-pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--oc-space-sm);
    flex-wrap: wrap;
}

.oc-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--oc-space-sm);
    border-radius: var(--oc-border-radius);
    font-size: var(--oc-font-size-sm);
    color: var(--oc-text-light);
    text-decoration: none;
    transition: all var(--oc-transition);
    border: 1px solid var(--oc-border);
    background-color: var(--oc-bg-white);
}

.oc-pagination .page-numbers:hover {
    border-color: var(--oc-accent);
    color: var(--oc-accent);
}

.oc-pagination .page-numbers.current {
    background-color: var(--oc-accent);
    border-color: var(--oc-accent);
    color: #fff;
}

.oc-pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.oc-empty {
    text-align: center;
    padding: var(--oc-space-3xl) var(--oc-space-lg);
}

.oc-empty__message {
    font-size: var(--oc-font-size-lg);
    color: var(--oc-text-light);
    margin-bottom: var(--oc-space-xl);
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.oc-breadcrumb {
    margin-bottom: var(--oc-space-xl);
}

.oc-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--oc-space-xs);
    font-size: var(--oc-font-size-sm);
}

.oc-breadcrumb__item {
    display: flex;
    align-items: center;
    gap: var(--oc-space-xs);
    color: var(--oc-text-muted);
}

.oc-breadcrumb__item a {
    color: var(--oc-text-light);
    text-decoration: none;
}

.oc-breadcrumb__item a:hover {
    color: var(--oc-accent);
}

.oc-breadcrumb__item + .oc-breadcrumb__item::before {
    content: '/';
    color: var(--oc-text-muted);
    margin-right: var(--oc-space-xs);
}

.oc-breadcrumb__item--current {
    color: var(--oc-text);
    font-weight: 500;
}

/* ==========================================================================
   Product Detail
   ========================================================================== */
.oc-product-detail {
    display: flex;
    flex-direction: column;
    gap: var(--oc-space-xl);
    margin-bottom: var(--oc-space-3xl);
}

@media (min-width: 769px) {
    .oc-product-detail {
        flex-direction: row;
        gap: var(--oc-space-3xl);
    }

    .oc-product-detail__gallery {
        width: 50%;
        flex-shrink: 0;
    }

    .oc-product-detail__info {
        flex: 1;
    }
}

/* Gallery */
.oc-product-detail__image-main {
    border-radius: var(--oc-border-radius-lg);
    overflow: hidden;
    background-color: var(--oc-bg-white);
    box-shadow: var(--oc-shadow);
}

.oc-product-detail__img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.oc-product-detail__img--placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--oc-border-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 24 24' fill='none' stroke='%23CCCCCC' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80px 80px;
}

/* Meta / Badges */
.oc-product-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--oc-space-sm);
    margin-bottom: var(--oc-space-md);
}

.oc-badge--rx {
    background-color: var(--oc-warning);
    color: #fff;
}

/* Title */
.oc-product-detail__title {
    font-size: var(--oc-font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--oc-space-md);
    line-height: 1.4;
}

/* Price */
.oc-product-detail__price {
    margin-bottom: var(--oc-space-md);
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--oc-space-sm);
}

.oc-product-detail__price-original {
    font-size: var(--oc-font-size-lg);
    color: var(--oc-text-muted);
}

.oc-product-detail__price-current {
    font-size: var(--oc-font-size-3xl);
    font-weight: 700;
    color: var(--oc-accent);
}

.oc-product-detail__price-tax {
    font-size: var(--oc-font-size-sm);
    color: var(--oc-text-light);
}

/* Shipping */
.oc-product-detail__shipping {
    font-size: var(--oc-font-size-sm);
    color: var(--oc-text-light);
    padding: var(--oc-space-sm) var(--oc-space-md);
    background-color: var(--oc-bg);
    border-radius: var(--oc-border-radius);
    margin-bottom: var(--oc-space-lg);
}

/* Description */
.oc-product-detail__description {
    margin-bottom: var(--oc-space-xl);
    line-height: 1.8;
    color: var(--oc-text-light);
}

.oc-product-detail__description p {
    margin-bottom: var(--oc-space-md);
}

/* Cart Section */
.oc-product-detail__cart {
    margin-bottom: var(--oc-space-lg);
}

.oc-product-detail__quantity {
    margin-bottom: var(--oc-space-md);
}

/* Quantity Selector */
.oc-quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--oc-border);
    border-radius: var(--oc-border-radius);
    overflow: hidden;
}

.oc-quantity-selector__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--oc-bg);
    border: none;
    cursor: pointer;
    font-size: var(--oc-font-size-lg);
    color: var(--oc-text);
    transition: background-color var(--oc-transition);
}

.oc-quantity-selector__btn:hover {
    background-color: var(--oc-border-light);
}

.oc-quantity-selector__input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--oc-border);
    border-right: 1px solid var(--oc-border);
    border-radius: 0;
    padding: 0;
    -moz-appearance: textfield;
}

.oc-quantity-selector__input::-webkit-inner-spin-button,
.oc-quantity-selector__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ==========================================================================
   Product Tabs / Sections
   ========================================================================== */
.oc-product-tabs {
    border-top: 1px solid var(--oc-border-light);
    padding-top: var(--oc-space-xl);
}

.oc-product-tabs__section {
    margin-bottom: var(--oc-space-xl);
    background-color: var(--oc-bg-white);
    border-radius: var(--oc-border-radius-lg);
    box-shadow: var(--oc-shadow);
    padding: var(--oc-space-xl);
}

.oc-product-tabs__section:last-child {
    margin-bottom: 0;
}

.oc-product-tabs__heading {
    font-size: var(--oc-font-size-lg);
    font-weight: 700;
    margin-bottom: var(--oc-space-md);
    padding-bottom: var(--oc-space-sm);
    border-bottom: 2px solid var(--oc-accent);
    color: var(--oc-text);
}

.oc-product-tabs__body {
    font-size: var(--oc-font-size-base);
    color: var(--oc-text-light);
    line-height: 1.8;
}
