
/* Product Card Add to Cart Icon */
.product-image {
    position: relative; /* Ensure we can position absolute children */
}

.btn-add-cart-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-add-cart-icon:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.showcase-img-container .btn-add-cart-icon {
    bottom: 15px;
    right: 15px;
}

/* Fly to Cart Animation */
.fly-to-cart {
    position: fixed;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 2px solid var(--secondary-color);
}

/* =========================================
   Elegant Cart Sidebar Styles (Daha Kibar)
   ========================================= */

/* Sidebar Container */
.cart-sidebar {
    width: 400px;
    max-width: 90vw;
    background-color: #fff;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    position: fixed;
    top: 0;
    right: -450px; /* Hidden by default */
    height: 100vh;
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Smooth ease-out */
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

/* Overlay Backdrop */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 9999;
    display: none;
    backdrop-filter: blur(3px); /* Modern blur effect */
    transition: opacity 0.3s ease;
}

.cart-overlay.active {
    display: block;
}

/* Header */
.cart-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.cart-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cart-close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-close-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

/* Body */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f8f9fa;
}

/* Custom Scrollbar */
.cart-body::-webkit-scrollbar {
    width: 5px;
}
.cart-body::-webkit-scrollbar-track {
    background: transparent;
}
.cart-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}
.cart-body::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Cart Item Card */
.cart-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.cart-item-img {
    width: 75px;
    height: 75px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item:hover .cart-item-img img {
    transform: scale(1.05);
}

.cart-item-info {
    flex: 1;
    padding-right: 30px; /* Space for remove button */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-item-info h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
    margin-bottom: 5px;
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

/* Quantity Controls */
.cart-item-controls {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 25px;
    width: fit-content;
    padding: 3px;
    border: 1px solid #e0e0e0;
}

.cart-item-controls button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background-color: #fff;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px; /* Smaller icon */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.cart-item-controls button:hover {
    background-color: var(--secondary-color);
    color: #fff;
    transform: scale(1.1);
}

.cart-item-controls span {
    margin: 0 12px;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 12px;
    text-align: center;
    color: #333;
}

/* Remove Button */
.cart-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #eee;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    opacity: 0; /* Hidden by default */
}

.cart-item:hover .cart-item-remove {
    opacity: 1; /* Show on hover */
}

.cart-item-remove:hover {
    background-color: #ffebee;
    color: #ff4444;
    border-color: #ffcdd2;
}

/* Footer */
.cart-footer {
    padding: 25px;
    background-color: #fff;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 10;
    border-top: 1px solid #f1f1f1;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
}

.cart-total span:first-child {
    color: #777;
    font-weight: 500;
    font-size: 1rem;
}

.cart-total .total-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1;
    font-family: 'Playfair Display', serif;
}

/* Checkout Button */
.btn-checkout {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5D4037 100%);
    color: #fff;
    text-align: center;
    border-radius: 50px; /* Fully rounded */
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(62, 39, 35, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-checkout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(62, 39, 35, 0.35);
    color: #fff;
    text-decoration: none;
}

.btn-checkout:hover::before {
    left: 100%;
}

/* Discount Row */
.cart-discount-row {
    background-color: #f1f8e9;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    border: 1px dashed #a5d6a7;
    margin-bottom: 15px;
    color: #2e7d32 !important;
}

/* Empty Cart */
.empty-cart-message {
    text-align: center;
    padding: 40px 20px;
    display: none; /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.empty-cart-message i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.empty-cart-message p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.btn-start-shopping {
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-start-shopping:hover {
    background-color: #c5a028;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* =========================================
   Product Detail Modal Styles (Daha Kibar)
   ========================================= */

.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.product-modal-container {
    background: #fff;
    width: 900px;
    max-width: 95%;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.product-modal-overlay.active .product-modal-container {
    transform: translateY(0);
}

.product-modal-content {
    display: flex;
    flex-direction: row;
    height: 100%;
    overflow-y: auto;
}

.modal-left {
    width: 50%;
    padding: 30px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-main-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    object-fit: contain;
}

.modal-right {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.modal-breadcrumbs {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
}

.modal-product-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
}

.modal-installment-info {
    font-size: 0.85rem;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 20px;
}

.modal-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-family: 'Playfair Display', serif;
}

.modal-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: auto;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 5px 10px;
}

.quantity-selector .qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #333;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.quantity-selector .qty-btn:hover {
    background: #ddd;
}

.quantity-selector .qty-input {
    width: 40px;
    text-align: center;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.btn-modal-add-cart {
    flex: 1;
    padding: 15px 30px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-modal-add-cart:hover {
    background: #5D4037;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.modal-close-btn:hover {
    transform: rotate(90deg);
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .product-modal-content {
        flex-direction: column;
    }
    .modal-left, .modal-right {
        width: 100%;
        padding: 20px;
    }
    .modal-main-image img {
        max-height: 250px;
    }
    .modal-title {
        font-size: 1.5rem;
    }
}

/* Old Price Strikethrough */
.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
    margin-right: 5px;
    font-weight: normal;
}
