/* ショッピングカートページのスタイル */

/* パンくずリスト */
.breadcrumb {
    background-color: #f8f8f8;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb ul {
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb ul li {
    font-size: 14px;
    color: #777;
}

.breadcrumb ul li:not(:last-child):after {
    content: '/';
    margin: 0 10px;
    color: #ddd;
}

.breadcrumb ul li a:hover {
    color: #333;
}

/* カートセクション */
.cart-section {
    padding: 40px 0 80px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

/* カートアイテム */
.cart-items {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.cart-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
    padding: 15px 20px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.cart-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
    padding: 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-product {
    display: flex;
    align-items: center;
}

.cart-product-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
}

.cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-product-info h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.cart-product-meta {
    font-size: 14px;
    color: #777;
}

.cart-product-meta span {
    display: inline-block;
    margin-right: 10px;
}

.cart-price, .cart-subtotal {
    font-weight: 500;
}

.quantity-selector {
    display: flex;
    align-items: center;
    max-width: 120px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}

.qty-input {
    width: 40px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    font-size: 14px;
}

.remove-item {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-item:hover {
    color: #f44336;
}

.cart-actions {
    padding: 20px;
    display: flex;
    justify-content: space-between;
}

.continue-shopping, .update-cart {
    padding: 10px 15px;
    font-size: 14px;
}

/* カートサマリー */
.cart-summary {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 25px;
    height: fit-content;
}

.cart-summary h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
}

.summary-row.subtotal, .summary-row.shipping {
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 25px;
}

.coupon-form {
    margin-bottom: 25px;
}

.coupon-form h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.coupon-input {
    display: flex;
}

.coupon-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.coupon-input button {
    border-radius: 0 4px 4px 0;
    padding: 10px 15px;
    font-size: 14px;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    margin-bottom: 20px;
}

.payment-methods-icons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.payment-methods-icons img {
    height: 24px;
    margin: 0 5px;
    opacity: 0.7;
}

/* おすすめ商品 */
.recommended-products {
    margin-top: 60px;
}

.recommended-products .section-title {
    text-align: center;
    margin-bottom: 30px;
}

.recommended-products .product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* カート空の状態 */
.empty-cart {
    text-align: center;
    padding: 60px 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.empty-cart i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.empty-cart p {
    font-size: 16px;
    color: #777;
    margin-bottom: 25px;
}

.empty-cart .btn {
    padding: 12px 25px;
    font-size: 16px;
}

/* レスポンシブデザイン */
@media (max-width: 992px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
    
    .recommended-products .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cart-header {
        display: none;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        row-gap: 15px;
        padding: 15px;
    }
    
    .cart-product {
        grid-column: 1 / -1;
    }
    
    .cart-price-col, .cart-quantity-col, .cart-subtotal-col {
        display: flex;
        align-items: center;
    }
    
    .cart-price-col::before, .cart-quantity-col::before, .cart-subtotal-col::before {
        content: attr(data-label);
        font-weight: 500;
        margin-right: 10px;
    }
    
    .cart-price-col {
        grid-column: 1 / 2;
    }
    
    .cart-price-col::before {
        content: '価格:';
    }
    
    .cart-quantity-col {
        grid-column: 1 / 2;
    }
    
    .cart-quantity-col::before {
        content: '数量:';
    }
    
    .cart-subtotal-col {
        grid-column: 1 / 2;
    }
    
    .cart-subtotal-col::before {
        content: '小計:';
    }
    
    .cart-remove-col {
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .continue-shopping, .update-cart {
        width: 100%;
    }
    
    .recommended-products .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .recommended-products .product-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-product {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-product-image {
        margin-right: 0;
        margin-bottom: 10px;
    }
}