/* 商品詳細ページスタイル */

html {
    scroll-behavior: smooth;
    word-break: break-all;
}

a:visited,
a:link {
    color: #666;
    text-decoration: none;
}

#item {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

#item .cInner {
    width: 100%;
}

.item__product-name {
    font-size: 30px;
    font-weight: bold;
    color: #000000;

    line-height: 1.5;
}

@media screen and (max-width: 768px) {
    .item__product-name {
        font-size: 18px;
        margin-bottom: 8px;
    }
}

.item__product-number {
    font-size: 24px;
    color: #000000;
    margin-bottom: 15px;
}

@media screen and (max-width: 768px) {
    .item__product-number {
        font-size: 14px;
        margin-bottom: 12px;
    }
}

.item__current-price {
    font-size: 24px;
    color: #000000;
    text-align: right;
}

.item__price-value {
    font-size: 32px;
    font-weight: bold;
    color: #eb171a;
}

.item__price-tax {
    font-size: 24px;
    color: #000000;
}

@media screen and (max-width: 768px) {
    .item__current-price {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .item__price-value {
        font-size: 20px;
    }

    .item__price-tax {
        font-size: 16px;
    }
}

.item__top-section {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

@media screen and (max-width: 768px) {
    .item__top-section {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 40px;
    }
}

.item__image-area {
    flex: 0 0 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media screen and (max-width: 768px) {
    .item__image-area {
        flex: 1 1 auto;
        width: 100%;
    }
}

.item__main-image {
    width: 100%;
    aspect-ratio: 1;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.item__main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item__thumbnail-list {
    display: flex;
    gap: 15px;
}

.item__thumbnail {
    flex: 0 0 100px;
    aspect-ratio: 1;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s;
}

.item__thumbnail.active {
    border-color: #eb171a;
}

.item__thumbnail:hover {
    border-color: #eb171a;
}

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

@media screen and (max-width: 768px) {
    .item__thumbnail {
        flex: 0 0 80px;
    }
}

.item__info-area {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.item__product-id {
    font-size: 32px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 10px;
}

@media screen and (max-width: 768px) {
    .item__product-id {
        font-size: 24px;
        margin-bottom: 20px;
    }
}

.item__info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.item__info-table tr {
    border-bottom: 1px solid #dfe0e0;
}

.item__info-table tr:first-child {
    border-top: 1px solid #dfe0e0;
}

.item__info-table th {
    text-align: left;
    padding: 20px 16px;
    font-weight: bold;
    color: #000000;
    vertical-align: top;
    width: 150px;
    background: #f2f3f3;
}

.item__info-table td {
    padding: 20px 16px;
    color: #000000;
}

@media screen and (max-width: 768px) {
    .item__info-table {
        font-size: 14px;
    }

    .item__info-table th {
        width: 120px;
        padding: 10px 12px;
        font-size: 12px;
    }

    .item__info-table td {
        padding: 10px 12px;
        font-size: 12px;
        word-break: break-all;
    }
}

.item__button-group {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
}

/* item_main.html用：item__action-buttonsが直接子要素の場合のみ縦並び */
.item__button-group>.item__action-buttons:only-child {
    flex-direction: column;
    gap: 20px;
    width: 70%;
}

/* item_main.html用：item__favorite-btnがない場合は縦並び */
.item__button-group:not(:has(.item__favorite-btn)) {
    flex-direction: column;
    gap: 20px;
    align-items: flex-end;
}

@media screen and (max-width: 768px) {
    .item__button-group {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .item__button-group .item__favorite-btn {
        width: 100%;
        justify-content: center;
    }

    .item__button-group .item__action-buttons {
        width: 100%;
    }

    .item__button-group>.item__action-buttons:only-child {
        width: 100%;
    }
}

.item__favorite-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 50px;
    color: #000000;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    align-self: flex-start;
}

.item__favorite-btn:hover {
    background-color: #000000;
    color: #ffffff;
}

.item__favorite-btn-icon {
    font-size: 24px;
    color: #f3b12d;
}

@media screen and (max-width: 768px) {
    .item__favorite-btn {
        font-size: 14px;
        padding: 10px 15px;
    }
}

.item__action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.item__bid-btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: #848484;
    color: #fff;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

.item__bid-btn.btn__blue {
    background-color: #1754a2;
    box-shadow: 0px 7px #093a79;
}

.item__bid-btn.btn__red {
    background-color: #e15714;
    box-shadow: 0px 7px #b93e2e;
}

#item.biz .item__bid-btn.btn__red {
    background-color: #1754a2;
    box-shadow: 0px 7px #093a79;
}

.item__bid-btn:hover {
    background-color: #999999;
}

.item__bid-btn.btn__blue:hover {
    background-color: #0f3d7a;
}

.item__bid-btn.btn__red:hover {
    background-color: #c04a1f;
}

.item__bid-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.item__bid-btn-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item__bid-btn-text {
    display: inline-block;
}

@media screen and (max-width: 768px) {
    .item__bid-btn {
        font-size: 18px;
        padding: 12px 25px;
    }

    .item__bid-btn-icon {
        font-size: 20px;
    }
}

.item__back-btn,
.item__back-btn:link,
.item__back-btn:visited {
    text-decoration: none;
    color: #000000;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: right;
    transition: color 0.3s;
}

.item__back-btn:hover {
    color: #666666;
}

@media screen and (max-width: 768px) {
    .item__bid-btn {
        font-size: 18px;
        padding: 12px 25px;
    }

    .item__back-btn {
        font-size: 14px;
    }
}

.item__order-section {
    margin-bottom: 30px;
}

@media screen and (max-width: 768px) {
    .item__order-section {
        margin-bottom: 20px;
        overflow-x: auto;
    }
}

.item__order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 16px;
    min-width: 600px;
}

@media screen and (max-width: 768px) {
    .item__order-table {
        min-width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.item__order-table thead {
    background-color: #f5f5f5;
}

.item__order-table th {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: #000000;
    border: 1px solid #ddd;
}

.item__order-table td {
    padding: 15px;
    border: 1px solid #ddd;
    color: #000000;
    vertical-align: middle;
}

.item__shipping-label {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #000;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}

.item__order-table .item__product-name {
    font-size: 18px;
    line-height: 1.6;
    color: #000000;
    margin-bottom: 0;
}

.item__order-table .item__product-number {
    font-size: 16px;
    color: #000000;
    margin-bottom: 0;
}

.item__price {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 5px;
}

.item__price-detail {
    font-size: 14px;
    color: #666666;
    text-align: right;
}

.item__quantity-counter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item__quantity-btn-group {
    display: flex;
}

.item__quantity-btn {
    width: 30px;
    height: 30px;
    background-color: #f2f3f3;
    border: 1px solid #848484;
    color: #848484;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.item__quantity-btn--minus {
    border-radius: 4px 0 0 4px;
}

.item__quantity-btn--plus {
    border-radius: 0 4px 4px 0;
}

.item__quantity-btn:hover {
    background-color: #f5f5f5;
}

.item__quantity-input {
    width: 60px;
    height: 30px;
    text-align: right;
    border: 1px solid #848484;
    font-size: 16px;
    color: #848484;
    border-radius: 4px;
}

.item__order-footer {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 20px;
}

.item__order-footer-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item__tax-note {
    flex: 1 1 auto;
    font-size: 14px;
    color: #000000;
    line-height: 1.6;
}

.item__cart-btn {
    padding: 15px 40px;
    background-color: #eb171a;
    border: none;
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
    width: 210px;
    border-radius: 4px;
}

.item__cart-btn:hover {
    background-color: #c01417;
}

@media screen and (max-width: 768px) {
    .item__order-table {
        font-size: 14px;
    }

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

    .item__shipping-label {
        font-size: 10px;
        padding: 3px 6px;
    }

    .item__order-table .item__product-name {
        font-size: 14px;
    }

    .item__order-table .item__product-number {
        font-size: 14px;
    }

    .item__price {
        font-size: 16px;
    }

    .item__price-detail {
        font-size: 12px;
    }

    .item__quantity-btn {
        width: 25px;
        height: 25px;
        font-size: 16px;
    }

    .item__quantity-input {
        width: 50px;
        height: 25px;
        font-size: 14px;
    }

    .item__order-footer {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .item__order-footer .item__product-number {
        font-size: 14px;
    }

    .item__tax-note {
        font-size: 12px;
        margin-bottom: 0;
    }

    .item__cart-btn {
        width: 100%;
        font-size: 16px;
        padding: 12px 30px;
    }
}

.item__detail-section {
    margin-top: 40px;
    padding-top: 30px;
}

.item__detail-title {
    font-size: 20px;
    font-weight: bold;
    color: #000000;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.item__detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #000000;
}

.item__detail-content p {
    margin-bottom: 10px;
}

@media screen and (max-width: 768px) {
    .item__detail-section {
        margin-top: 30px;
        padding-top: 20px;
    }

    .item__detail-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .item__detail-content {
        font-size: 14px;
    }

    .item__detail-content p {
        margin-bottom: 8px;
    }
}



/* ========================================
   オークション入札フォーム スタイル
   ======================================== */

.form__wrapper {
    margin-top: 40px;
}

.auction-form-section {
    padding: 60px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

.auction-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.form-header {
    background: #e15714;
    color: #ffffff;
    padding: 40px 30px;
    text-align: center;
}

#item.biz .form-header {
    background: #1754a2;
}



.form-title {
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 16px 0;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.form-description {
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
    opacity: 0.95;
    color: #fff;
}

.required-note {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: #ffeb3b;
    font-weight: 700;
}

.auction-form {
    padding: 40px 30px;
}

/* フォームグループ */
.form-group {
    margin-bottom: 32px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.required-badge {
    background: #e15714;
    color: #ffffff;
    font-size: 11px;
    display: block;
    padding: 1px 5px;
}

#item.biz .required-badge {
    background: #1754a2;
}

/* 入力フィールド */
.form-input,
.form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e0e6ed;
    border-radius: 4px;
    background: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #dc0012;
    box-shadow: 0 0 0 4px rgba(220, 0, 18, 0.1);
}

.form-input::placeholder {
    color: #95a5a6;
}

/* 名前フィールド */
.name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.name-field {
    position: relative;
}

.field-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 6px;
    padding-left: 4px;
}

/* 住所フィールド */
.address-field {
    margin-bottom: 16px;
}

.sub-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
}

.zip-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zip-prefix {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

/* 価格入力 */
.price-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-input {
    flex: 1;
}

.price-unit {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

/* フィールドノート */
.field-note {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.6;
}

/* 注意事項ボックス */
.notice-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.notice-title {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
}

.notice-title:not(:first-child) {
    margin-top: 20px;
}

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

.notice-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.8;
    color: #495057;
}

.notice-list li:before {
    content: "●";
    position: absolute;
    left: 0;
    color: #dc0012;
    font-size: 12px;
}

/* チェックボックス */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: #e9ecef;
    border-color: #dc0012;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-text {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.6;
}

/* 送信ボタン */
.form-submit {
    margin-top: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #e15714;
    color: #ffffff;
    font-size: 18px;
    padding: 20px 40px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-shadow: none;
    position: relative;
    width: 100%;
    max-width: 300px;
}

#item.biz .submit-button {
    background: #1754a2;
}

.submit-button:hover {

    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 #ffeb3b;
}

.submit-button:active {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 #ffeb3b;
}

.button-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.submit-button:hover .button-icon {
    transform: translateX(4px);
}

/* ========================================
   レスポンシブデザイン（スマホ対応）
   ======================================== */

@media (max-width: 768px) {
    .auction-form-section {
        padding: 40px 16px;
    }

    .auction-form-container {
        border-radius: 4px;
    }

    .form-header {
        padding: 30px 20px;
    }

    .form-title {
        font-size: 22px;
    }

    .form-description {
        font-size: 13px;
    }

    .auction-form {
        padding: 30px 0px;
    }

    .form-group {
        margin-bottom: 28px;
    }

    .form-label {
        font-size: 15px;
    }

    /* 名前フィールドを縦並びに */
    .name-fields {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* 価格入力を縦並びに */
    .price-input-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

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

    /* 注意事項ボックス */
    .notice-box {
        padding: 20px 16px;
        max-height: 685px;
    }

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

    .notice-list li {
        font-size: 13px;
    }

    /* チェックボックス */
    .checkbox-label {
        padding: 14px;
    }

    .checkbox-text {
        font-size: 14px;
    }

    /* 送信ボタン */
    .submit-button {
        width: 100%;
        font-size: 16px;
        padding: 16px 40px;
    }
}

@media (max-width: 480px) {
    .form-title {
        font-size: 20px;
    }

    .form-input,
    .form-select {
        font-size: 16px;
        /* iOS のズーム防止 */
        padding: 12px 14px;
    }

    .submit-button {
        font-size: 15px;
        padding: 14px 30px;
    }
}

/* ========================================
   アクセシビリティ・ユーザビリティ向上
   ======================================== */

/* フォーカス時のアウトライン強化 */
.form-checkbox:focus {
    outline: 2px solid #dc0012;
    outline-offset: 2px;
}

/* エラー状態（必要に応じて追加可能） */
.form-input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

.form-input:valid:not(:placeholder-shown) {
    border-color: #27ae60;
}

/* スクロールバーのスタイリング（Webkit系ブラウザ） */
.notice-box::-webkit-scrollbar {
    width: 8px;
}

.notice-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.notice-box::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.notice-box::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}