/* 商品一覧スタイル */
.fds-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.fds-product-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.fds-product-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.fds-product-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
}

.fds-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.fds-no-image {
    color: #999;
    text-align: center;
    padding: 30px;
}

.fds-product-info {
    padding: 15px;
}

.fds-product-title {
    margin: 0 0 10px;
    font-size: 18px;
}

.fds-product-price {
    font-weight: bold;
    color: #d54e21;
    margin-bottom: 10px;
}

.fds-product-link {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 8px 15px;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.fds-product-link:hover {
    background: #005177;
    color: #fff;
}

/* 単一商品ページスタイル */
.fds-single-product {
    margin: 20px 0;
}

.fds-product-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .fds-product-container {
        grid-template-columns: 1fr;
    }
}

.fds-single-product .fds-product-image {
    height: 300px;
    border: 1px solid #ddd;
}

.fds-single-product .fds-product-title {
    font-size: 24px;
    margin: 0 0 15px;
}

.fds-single-product .fds-product-price {
    font-size: 20px;
    margin-bottom: 20px;
}

.fds-single-product .fds-product-description {
    margin-bottom: 20px;
}

.fds-product-meta {
    background: #f7f7f7;
    padding: 15px;
    border-radius: 3px;
    margin-bottom: 20px;
}

.fds-buy-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.fds-buy-button:hover {
    background: #005177;
}

.fds-payment-form {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.fds-submit-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.fds-submit-button:hover {
    background: #005177;
}

.fds-payment-success {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #46b450;
    background: #ecf7ed;
    border-radius: 3px;
}

.fds-download-button {
    display: inline-block;
    background: #46b450;
    color: #fff;
    padding: 10px 20px;
    border-radius: 3px;
    text-decoration: none;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.fds-download-button:hover {
    background: #389a42;
    color: #fff;
}

.fds-error-message {
    color: #dc3232;
    margin-top: 10px;
}

.fds-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* サンクスメッセージポップアップ */
.fds-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.fds-popup-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.fds-popup-content h3 {
    margin-top: 0;
    color: #0073aa;
}

.fds-popup-close {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 20px;
    font-size: 16px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.fds-popup-close:hover {
    background: #005177;
}

/* マイページ購入履歴スタイル */
.fds-purchase-history {
    margin: 20px 0;
}

.fds-purchase-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.fds-purchase-table th,
.fds-purchase-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.fds-purchase-table th {
    background: #f7f7f7;
}

.fds-purchase-table tr:hover {
    background: #f9f9f9;
}

.fds-download-link {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.fds-download-link:hover {
    background: #005177;
    color: #fff;
}

/* ログイン必須メッセージ */
.fds-login-required {
    background: #f7f7f7;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin: 20px 0;
}

.fds-empty-purchases {
    background: #f7f7f7;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin: 20px 0;
    text-align: center;
}

/* エラーメッセージ */
.fds-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    margin-bottom: 20px;
}

/* 成功メッセージ */
.fds-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 3px;
    margin-bottom: 20px;
}
