/* OSIRIS BOOKSHOP - Cart Page Styles */


/* Import Main Variables */

@import url('home.css');

/* Cart Section */

.cart-section {
    padding: 4rem 0;
    position: relative;
    min-height: 100vh;
}

.cart-background-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.cart-gradient-orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: orbFloat 20s ease-in-out infinite;
}

.cart-gradient-orb.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--gradient-primary);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.cart-gradient-orb.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--gradient-secondary);
    bottom: 20%;
    right: 15%;
    animation-delay: 5s;
}

.cart-gradient-orb.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-purple);
    top: 60%;
    left: 70%;
    animation-delay: 10s;
}

.cart-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}


/* Cart Header */

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

.cart-title {
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-title-icon {
    font-size: 2rem;
    animation: cartBounce 2s ease-in-out infinite;
}

.cart-stats {
    display: flex;
    gap: 2rem;
}

.cart-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(42, 42, 42, 0.5);
    border-radius: 15px;
    min-width: 120px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-cyan);
}


/* Cart Content */

.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.cart-items-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.section-header h3 {
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

.clear-cart-btn {
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.3);
    color: #ff6b6b;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}

.clear-cart-btn:hover {
    background: rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}


/* Cart Items */

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(42, 42, 42, 0.3);
    border-radius: 15px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.cart-item:hover::before {
    opacity: 0.05;
}

.cart-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cart-item-image {
    width: 100px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item:hover .cart-item-image img {
    transform: scale(1.05);
}

.cart-item-info {
    position: relative;
    z-index: 1;
}

.cart-item-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.cart-item-author {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.8rem;
}

.cart-item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.cart-item-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.cart-item-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-action-btn:hover {
    background: var(--accent-cyan);
    color: white;
    transform: translateY(-2px);
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.cart-item-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(42, 42, 42, 0.5);
    border-radius: 25px;
    padding: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.quantity-btn:hover {
    transform: scale(1.1);
}

.quantity-value {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
}

.remove-item-btn {
    background: rgba(255, 107, 53, 0.2);
    border: none;
    color: #ff6b6b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.remove-item-btn:hover {
    background: rgba(255, 107, 53, 0.3);
    transform: scale(1.1);
}


/* Order Summary */

.order-summary-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.order-summary-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.summary-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.order-summary-card:hover .summary-glow {
    opacity: 0.05;
}

.summary-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-gold);
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.discount {
    color: #4ecdc4;
}

.summary-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
}

.coupon-section {
    margin-bottom: 2rem;
}

.coupon-section .input-group {
    display: flex;
    gap: 0.5rem;
}

.coupon-section input {
    flex: 1;
    padding: 1rem;
    background: rgba(42, 42, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    outline: none;
}

.apply-coupon-btn {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.apply-coupon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.checkout-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.secure-payment {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}


/* Recommended Books */

.recommended-books {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

.recommended-books h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
}

.recommended-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommended-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(42, 42, 42, 0.3);
    border-radius: 12px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.recommended-item:hover {
    background: rgba(42, 42, 42, 0.5);
    transform: translateX(-5px);
}

.recommended-image {
    width: 60px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.recommended-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recommended-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: white;
}

.recommended-info p {
    font-size: 0.9rem;
    color: var(--accent-gold);
    font-weight: 700;
}

.add-to-cart-sm {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.add-to-cart-sm:hover {
    transform: scale(1.1);
}


/* Floating Action Buttons */

.cart-fab {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.fab-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition-smooth);
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.fab-btn.continue-shopping {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: white;
}

.fab-btn.quick-checkout {
    background: var(--gradient-secondary);
    color: white;
}

.fab-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}


/* Empty Cart State */

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1.5rem;
    animation: bounce 2s ease-in-out infinite;
}

.empty-cart h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.empty-cart p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}


/* Animations */

@keyframes cartBounce {
    0%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.cart-item {
    animation: slideInRight 0.6s ease forwards;
    opacity: 0;
}

.cart-item:nth-child(1) {
    animation-delay: 0.1s;
}

.cart-item:nth-child(2) {
    animation-delay: 0.2s;
}

.cart-item:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Responsive Design */

@media (max-width: 1200px) {
    .cart-content {
        grid-template-columns: 1fr;
    }
    .order-summary-section {
        flex-direction: row;
    }
    .order-summary-card,
    .recommended-books {
        flex: 1;
    }
}

@media (max-width: 992px) {
    .cart-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .cart-stats {
        justify-content: center;
    }
    .order-summary-section {
        flex-direction: column;
    }
}

@media (max-width: 808px) {
    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .cart-item-controls {
        align-items: center;
    }
    .cart-item-actions {
        justify-content: center;
    }
    .cart-fab {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        flex-direction: row;
        justify-content: center;
    }
    .fab-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .cart-content,
    .order-summary-section,
    .recommended-list {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0.5rem !important;
        flex-direction: column !important;
    }
    .cart-header,
    .cart-items-section,
    .order-summary-card,
    .recommended-books {
        padding: 1rem !important;
    }
}

@media (max-width: 576px) {
    .cart-container {
        padding: 0 1rem;
    }
    .cart-header {
        padding: 1.5rem;
    }
    .cart-title {
        font-size: 2rem;
    }
    .cart-stats {
        flex-direction: column;
        gap: 1rem;
    }
    .cart-items-section,
    .order-summary-card,
    .recommended-books {
        padding: 1.5rem;
    }
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}


/* تحسينات Responsive 100% لصفحة السلة بدون تغيير في التصميم */


/* 1. تأكد أن كل الحاويات الرئيسية لا تخرج عن الشاشة */

html,
body,
.cart-container,
.cart-section,
.order-summary-section,
.recommended-books,
.cart-items-section,
.footer-container {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}


/* 2. الصور والفيديوهات مرنة دائمًا */

img,
video {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
}


/* 3. الجريدات تتحول لعمود واحد على الشاشات الصغيرة جدًا */

@media (max-width: 600px) {
    .cart-content,
    .order-summary-section,
    .recommended-list {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0.5rem !important;
        flex-direction: column !important;
    }
    .cart-header,
    .cart-items-section,
    .order-summary-card,
    .recommended-books {
        padding: 1rem !important;
    }
}


/* 4. تصغير حجم الخطوط تلقائيًا على الشاشات الصغيرة جدًا */

@media (max-width: 400px) {
    html {
        font-size: 13px !important;
    }
}


/* 5. إصلاح أي عنصر فيه min-width كبير أو width ثابت */

[class*="container"],
[class*="content"],
[class*="section"],
[class*="grid"],
[class*="sidebar"] {
    min-width: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
}


/* 6. شريط التنقل دائمًا بعرض الشاشة */

.header,
.nav-menu {
    width: 100vw !important;
    min-width: 0 !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}


/* 7. إخفاء التمرير الأفقي دائمًا */

body,
html {
    overflow-x: hidden !important;
}