/* 商品詳細ページのスタイル */
body {
    font-family: sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #007bff;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.product-layout {
    display: flex;
    gap: 30px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.product-main {
    flex: 1;
    padding: 30px;
}

.product-content {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.product-image {
    width: 300px;
    height: 300px;
    object-fit: contain;
    border-radius: 8px;
}

.product-details {
    flex: 1;
}

.product-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.product-price {
    font-size: 28px;
    color: #007bff;
    font-weight: bold;
    margin-bottom: 20px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stars {
    color: #ffa500;
    font-size: 18px;
}

.rating-text {
    color: #666;
    font-size: 14px;
}

.capacity-selector {
    margin-bottom: 20px;
}

.capacity-selector h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.capacity-selector select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.capacity-selector select:hover,
.capacity-selector select:focus {
    border-color: #007bff;
    outline: none;
}

.product-description {
    margin-top: 20px;
    line-height: 1.6;
    color: #666;
}

.product-description h3 {
    color: #333;
    margin-bottom: 10px;
}

.variants-list {
    margin-top: 15px;
}

.variants-list ul {
    list-style: none;
    padding: 0;
}

.variants-list li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

/* 右側のレンタル予約エリア */
.rental-sidebar {
    width: 350px;
    background: #f8f9fa;
    padding: 30px;
    border-left: 1px solid #e9ecef;
}

.rental-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.delivery-info {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.delivery-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.calendar div {
    padding: 10px 5px;
    text-align: center;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar .day-name {
    font-weight: bold;
    background-color: #f8f9fa;
    cursor: default;
    font-size: 12px;
}

.calendar .day:hover {
    background-color: #e3f2fd;
}

.calendar .selected {
    background-color: #2196f3;
    color: white;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.calendar-navigation button {
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-navigation button:hover {
    background: #1976d2;
}

.calendar-navigation button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.calendar-navigation span {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.rent-button {
    width: 100%;
    background: #2196f3;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.rent-button:hover {
    background: #1976d2;
}

.rent-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-required {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.login-required a {
    color: #721c24;
    text-decoration: underline;
}

.login-btn {
    display: inline-block;
    background: #721c24;
    color: white !important;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none !important;
    margin-top: 10px;
}

.login-btn:hover {
    background: #5a161f;
}

.user-options {
    display: flex;
    margin-bottom: 20px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.option-button {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    border-right: 1px solid #e9ecef;
}

.option-button:last-child {
    border-right: none;
}

.option-button.active {
    background: #2196f3;
    color: white;
}

.option-button:not(.active):hover {
    background: #e3f2fd;
}

.option-content {
    transition: opacity 0.3s ease;
}

.option-content.hidden {
    display: none;
}

.guest-notice {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.user-status {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.selected-date {
    margin-top: 15px;
    padding: 10px;
    background: #e8f5e8;
    border-radius: 4px;
    font-size: 14px;
    color: #2e7d32;
}

.date-warning {
    margin-top: 15px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 14px;
    color: #856404;
}

/* カスタマイズセクションのスタイル */
.customization-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.customization-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
}

.customization-tab {
    flex: 1;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.customization-tab.active {
    background: white;
    color: #333;
    border-bottom-color: #007bff;
}

.customization-tab:hover:not(.active) {
    background: #e9ecef;
}

.customization-content {
    padding: 30px;
}

.customization-panel {
    display: none;
}

.customization-panel.active {
    display: block;
}

.option-category {
    margin-bottom: 40px;
}

.option-category:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.category-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.option-item:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.option-item.selected {
    border-color: #007bff;
    background: #e3f2fd;
}

.option-item input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
}

.option-details {
    flex: 1;
}

.option-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.option-description {
    color: #666;
    font-size: 14px;
}

.option-price {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
    margin-left: 20px;
}

.option-price.free {
    color: #28a745;
}

.continue-reading-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
}

.continue-reading-btn:hover {
    background: #5a6268;
}

.total-price-section {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-price {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.total-amount {
    color: #007bff;
}

.cart-button {
    background: #2196f3;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cart-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cart-button:disabled:hover {
    background: #ccc;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .product-layout {
        flex-direction: column;
    }
    .rental-sidebar {
        width: auto;
        border-left: none;
        border-top: 1px solid #e9ecef;
    }
    .product-content {
        flex-direction: column;
    }
    .product-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    .customization-tabs {
        flex-direction: column;
    }
    .customization-tab {
        text-align: center;
    }
}