/**
 * Fatbikes.be Light Theme - Cart Page Styles
 * Cart-specific components: cart header, items, summary, checkout
 */

/* ========================================
   CART CONTAINER MODULE
   Prefix: cart-
   ======================================== */

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.cart-header {
    text-align: center;
    margin-bottom: 40px;
}

.cart-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 10px 0;
}

.cart-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    justify-content: center;
}

/* ========================================
   CART ITEMS TABLE MODULE
   Prefix: cart-items-
   ======================================== */

.cart-items {
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.cart-items table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.cart-items thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.cart-items thead th {
    padding: 20px 15px;
    font-weight: 600;
    color: #495057;
    text-align: left;
    border: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-items tbody td {
    padding: 25px 15px;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: middle;
}

.cart-items tbody tr:last-child td {
    border-bottom: none;
}

.cart-items tbody tr:hover {
    background: #fafafa;
}

/* Product info in cart */
.cart-item-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.cart-item-details h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #000000;
}

.cart-item-details p {
    font-size: 13px;
    color: #666666;
    margin: 0;
}

/* Quantity controls */
.cart-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.cart-quantity button {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-quantity button:hover {
    background: #32cd33;
    border-color: #32cd33;
    color: #fff;
}

.cart-quantity input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 14px;
}

/* Price display */
.cart-price {
    font-weight: 600;
    font-size: 16px;
    color: #000000;
    text-align: right;
}

.cart-total-price {
    font-weight: 700;
    font-size: 18px;
    color: #32cd33;
}

/* Remove button */
.cart-remove {
    text-align: center;
}

.cart-remove button {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-remove button:hover {
    background: #666666;
    transform: scale(1.1);
}

/* ========================================
   CART SUMMARY MODULE
   Prefix: cart-summary-
   ======================================== */

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.cart-summary {
    background: #ffffff;
    border-radius: 10px;
    padding: 30px;
    position: sticky;
    top: 20px;
}

.cart-summary h3 {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f1f1;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.cart-summary-row:last-child {
    border-bottom: none;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #f1f1f1;
}

.cart-summary-label {
    font-size: 14px;
    color: #666666;
    font-weight: 500;
}

.cart-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
}

.cart-total .cart-summary-label,
.cart-total .cart-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #32cd33;
}

/* ========================================
   CART ACTIONS MODULE
   Prefix: cart-actions-
   ======================================== */

.cart-actions {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-checkout-btn {
    background: #32cd33;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.cart-checkout-btn:hover {
    background: #666666;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.cart-continue-btn {
    background: transparent;
    color: #666666;
    border: 2px solid #e9ecef;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.cart-continue-btn:hover {
    background: #f8f9fa;
    border-color: #32cd33;
    color: #32cd33;
    text-decoration: none;
}

.cart-clear-btn {
    background: #dc3545;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.cart-clear-btn:hover {
    background: #666666;
}

/* ========================================
   COUPON MODULE
   Prefix: cart-coupon-
   ======================================== */

.cart-coupon {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.cart-coupon h4 {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 15px 0;
}

.cart-coupon-form {
    display: flex;
    gap: 10px;
}

.cart-coupon input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.cart-coupon button {
    background: #32cd33;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cart-coupon button:hover {
    background: #666666;
}

/* ========================================
   EMPTY CART MODULE
   Prefix: cart-empty-
   ======================================== */

.cart-empty {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 10px;
}

.cart-empty-icon {
    font-size: 64px;
    color: #e9ecef;
    margin-bottom: 20px;
}

.cart-empty h2 {
    font-size: 24px;
    font-weight: 600;
    color: #666666;
    margin: 0 0 15px 0;
}

.cart-empty p {
    font-size: 16px;
    color: #999999;
    margin: 0 0 30px 0;
}

.cart-empty-btn {
    background: #32cd33;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
    transition: all 0.3s ease;
}

.cart-empty-btn:hover {
    background: #666666;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* ========================================
   RELATED PRODUCTS MODULE (Match Homepage)
   Prefix: fatbikes-product-
   ======================================== */

.related {
    background: #f6f6f6;
    padding: 60px 0;
    margin-top: 40px;
}

.related h2 {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    text-align: center;
    margin: 0 0 40px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.products-grid > div {
    list-style: none;
}

.fatbikes-product-card {
    width: 100%;
    height: 400px;
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: zoom-in;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.fatbikes-product-card:hover {
    border: 1px solid #dbdbdb;
}

.fatbikes-product-image-container {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.fatbikes-product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fatbikes-product-text-content {
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.fatbikes-product-card:hover .fatbikes-product-text-content {
    transform: translateY(-25px);
}

.fatbikes-product-card-name {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.3 !important;
    min-height: 40px;
}

.fatbikes-product-card-rating {
    margin: 0 0 10px 0;
}

.fatbikes-product-card-rating .sylius-rating {
    display: flex;
    justify-content: center;
    gap: 2px;
}

.fatbikes-product-card-rating .sylius-rating label {
    margin: 0;
    padding: 0;
}

.fatbikes-product-card-rating .sylius-rating .icon {
    width: 16px;
    height: 16px;
    color: #ffd700;
}

.fatbikes-product-card [data-test-product-price] {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin: 0 0 15px 0 !important;
}

.fatbikes-product-card .btn {
    background: #32cd33 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 15px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    width: 100% !important;
    transition: background 0.3s ease !important;
}

.fatbikes-product-card .btn:hover {
    background: #666666 !important;
    color: #ffffff !important;
}

.fatbikes-product-card a.link-reset {
    text-decoration: none;
    color: inherit;
}

.fatbikes-product-card a.link-reset:hover {
    text-decoration: none;
    color: inherit;
}

/* Mobile: Show product content by default */
@media (max-width: 768px) {
    .fatbikes-product-text-content {
        transform: translateY(-10px);
    }

    .fatbikes-product-card:hover .fatbikes-product-text-content {
        transform: translateY(-10px);
    }

    .fatbikes-product-card {
        width: 280px;
        height: 380px;
    }

    .products-grid {
        justify-content: center;
        gap: 15px;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cart-summary {
        position: static;
        order: -1;
    }

    .cart-items thead th {
        padding: 15px 10px;
        font-size: 12px;
    }

    .cart-items tbody td {
        padding: 20px 10px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .cart-container {
        padding: 20px 15px;
    }

    .cart-header h1 {
        font-size: 24px;
    }

    /* Stack cart table on mobile */
    .cart-items table,
    .cart-items thead,
    .cart-items tbody,
    .cart-items th,
    .cart-items td,
    .cart-items tr {
        display: block;
    }

    .cart-items thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .cart-items tr {
        border: 1px solid #ccc;
        margin-bottom: 20px;
        border-radius: 8px;
        background: #fff;
        padding: 15px;
    }

    .cart-items td {
        border: none;
        padding: 10px 0;
        position: relative;
        text-align: left !important;
    }

    .cart-items td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #666;
        display: inline-block;
        width: 100px;
        margin-right: 10px;
    }

    .cart-item-product {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .cart-quantity {
        justify-content: flex-start;
        margin-left: 110px;
    }

    .cart-summary {
        padding: 20px;
    }

    .cart-coupon-form {
        flex-direction: column;
    }

    .cart-coupon button {
        width: 100%;
    }
}
