/* cart.css */
.cart-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-title {
    text-align: center;
    margin: 30px 0 50px;
}

.page-title h1 {
    font-size: 36px;
    font-weight: 200;
    letter-spacing: 4px;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.page-title .subtitle {
    font-size: 18px;
    font-weight: 200;
    color: #666;
    letter-spacing: 2px;
}

.cart-container {
    max-width: 1100px;
    margin: 0 auto 60px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.cart-items {
    margin-bottom: 30px;
}

.selected-product {
    position: relative;
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 20px;
}

.remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.remove-item:hover {
    color: #e74c3c;
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Kontejner za slike */
.product-image-container {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 30px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    border: 1px solid #f0f0f0;
    padding: 5px;
}

.product-image-container:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-color: #e0e0e0;
}

.selected-product img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Magnifier element koji prati miš */
.magnifier {
    position: absolute; /* umjesto fixed */
    width: 300px;
    height: 300px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: white;
    z-index: 9999;
    display: none;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.magnifier img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-details {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-details h2 {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 2px;
    color: #333;
    margin-bottom: 8px;
}

.price {
    font-size: 18px;
    font-weight: 400;
    color: #666;
    margin-bottom: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding-left: 30px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn i {
    font-size: 12px;
    color: #666;
}

.quantity-btn:hover {
    background: #f5f5f5;
}

.quantity-selector input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 300;
    -moz-appearance: textfield;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.checkout-section {
    border-top: 1px solid #f5f5f5;
    padding-top: 20px;
}

.subtotal, .discount, .total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 1px;
}

.subtotal span, .discount span, .total span {
    min-width: 120px;
}

.discount {
    color: #27ae60;
}

.discount-amount {
    color: #27ae60;
    font-weight: 400;
}

.total {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 25px;
}

.checkout-btn {
    width: 100%;
    padding: 15px 40px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #444;
    transform: translateY(-2px);
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.discount-code-section {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    letter-spacing: 1px;
}

.newsletter-form button {
    padding: 12px 25px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: #444;
}

.discount-message {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #27ae60;
}

/* Responzivni dizajn */
@media (max-width: 900px) {
    .selected-product {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .product-image-container {
        margin: 0 0 20px 0;
    }

    .product-details {
        flex-direction: column;
    }

    .quantity-selector {
        margin: 20px 0 0 0;
        padding-left: 0;
    }

    .subtotal, .discount, .total {
        justify-content: space-between;
    }
}

/* Isključivanje funkcionalnosti na mobilnim uređajima */
@media (max-width: 768px) {
    .product-image-container {
        cursor: default;
    }
    
    .magnifier {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .cart-container {
        padding: 15px;
    }

    .page-title h1 {
        font-size: 28px;
    }

    .page-title .subtitle {
        font-size: 16px;
    }

    .checkout-section {
        padding: 20px 15px;
    }
}
