/* =========================
   Cart Page Only Styles
   Global root/body/container/font/header/footer must stay in app.blade.php
========================= */

/* Breadcrumb */

.breadcrumb-section {
    padding: 26px 0 12px;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.breadcrumb .current,
.breadcrumb a:hover {
    color: var(--primary);
}

/* =========================
   Cart Hero
========================= */

.cart-hero {
    padding: 12px 0 30px;
}

.cart-hero .hero-card {
    border-radius: 36px;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #111827, #19346f 58%, #2356d8);
    color: #fff;
    padding: 34px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.cart-hero .hero-card::after {
    content: "CART";
    position: absolute;
    left: 28px;
    bottom: -18px;
    font-size: 135px;
    font-weight: 950;
    color: rgba(255, 255, 255, 0.06);
    letter-spacing: -4px;
    pointer-events: none;
}

.cart-hero .hero-content {
    position: relative;
    z-index: 1;
}

.cart-hero .hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 14px;
}

.cart-hero .hero-content h1 {
    margin: 0 0 10px;
    font-size: 36px;
    line-height: 1.35;
}

.cart-hero .hero-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    line-height: 2;
}

/* =========================
   Checkout Steps
========================= */

.checkout-steps {
    display: grid;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.checkout-steps .step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 13px 15px;
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.75);
    font-weight: 900;
}

.checkout-steps .step span {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    flex: 0 0 auto;
}

.checkout-steps .step.active {
    background: #fff;
    color: var(--primary-2);
}

.checkout-steps .step.active span {
    background: var(--primary);
    color: #fff;
}

/* =========================
   Cart Layout
========================= */

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
    padding-bottom: 46px;
}

.cart-panel,
.summary-panel,
.suggest-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(30, 30, 30, 0.08);
    box-shadow: var(--shadow-soft);
    border-radius: 30px;
}

.cart-panel {
    padding: 24px;
    min-width: 0;
}

.panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-head h2 {
    margin: 0;
    font-size: 24px;
}

.panel-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.clear-cart {
    border: 0;
    background: #fff0f0;
    color: var(--danger);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 950;
    cursor: pointer;
    transition: 0.22s ease;
}

.clear-cart:hover {
    background: var(--danger);
    color: #fff;
}

/* =========================
   Cart Items
========================= */

.cart-list {
    display: grid;
    gap: 14px;
}

.cart-item {
    display: grid;
    grid-template-columns: 96px 1fr 130px 125px 44px;
    gap: 14px;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(30, 30, 30, 0.08);
    border-radius: 24px;
    padding: 14px;
    transition: 0.22s ease;
}

.cart-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(35, 86, 216, 0.16);
}

.book-cover {
    height: 118px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    color: #fff;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 950;
    font-size: 12px;
    line-height: 1.5;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.book-cover::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 0;
    width: 12px;
    height: 100%;
    background: rgba(255, 255, 255, 0.16);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    position: relative;
    z-index: 1;
}

.item-info h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.7;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.meta-badge {
    background: #f8fafc;
    border: 1px solid rgba(30, 30, 30, 0.06);
    border-radius: 999px;
    padding: 7px 10px;
}

.price-box {
    display: grid;
    gap: 5px;
    text-align: center;
}

.price-box del {
    color: #a0a0a0;
    font-size: 12px;
}

.price-box strong {
    color: var(--primary-2);
    font-size: 16px;
}

.price-box small {
    color: var(--muted);
    font-size: 12px;
}

.qty-form {
    display: grid;
    gap: 7px;
}

.qty {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    height: 44px;
    border: 1px solid rgba(30, 30, 30, 0.08);
    border-radius: 16px;
    overflow: hidden;
    background: #f8fafc;
}

.qty button {
    border: 0;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    color: #111827;
}

.qty input {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: center;
    outline: none;
    font-weight: 950;
}

.update-cart-btn {
    border: 0;
    background: #f3f6ff;
    color: var(--primary);
    border-radius: 12px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.22s ease;
}

.update-cart-btn:hover {
    background: var(--primary);
    color: #fff;
}

.remove-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 15px;
    background: #fff0f0;
    color: var(--danger);
    font-size: 18px;
    cursor: pointer;
    transition: 0.22s ease;
}

.remove-btn:hover {
    background: var(--danger);
    color: #fff;
    transform: translateY(-2px);
}

/* =========================
   Cart Tools / Coupon
========================= */

.cart-tools {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 18px;
}

.coupon {
    display: flex;
    background: #fff;
    border: 1px solid rgba(30, 30, 30, 0.08);
    border-radius: 22px;
    padding: 8px;
}

.coupon input {
    flex: 1;
    border: 0;
    outline: none;
    padding: 0 12px;
    background: transparent;
    min-width: 0;
}

.coupon button {
    border: 0;
    background: #111827;
    color: #fff;
    border-radius: 16px;
    padding: 12px 18px;
    font-weight: 950;
    cursor: pointer;
    transition: 0.22s ease;
}

.coupon button:hover {
    background: var(--primary);
}

.continue-btn {
    border: 1px solid rgba(35, 86, 216, 0.16);
    background: #f3f6ff;
    color: var(--primary);
    border-radius: 22px;
    padding: 0 18px;
    font-weight: 950;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.22s ease;
}

.continue-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* =========================
   Summary Panel
========================= */

.summary-panel {
    padding: 22px;
    position: sticky;
    top: 150px;
}

.summary-panel::before {
    content: "";
    display: block;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin-bottom: 18px;
}

.summary-panel h2 {
    margin: 0 0 16px;
    font-size: 23px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(30, 30, 30, 0.07);
    font-size: 14px;
}

.summary-row span:first-child {
    color: var(--muted);
}

.summary-row strong {
    font-size: 16px;
    color: #111827;
}

.shipping-box {
    margin: 18px 0;
    background: #f8fafc;
    border: 1px solid rgba(30, 30, 30, 0.06);
    border-radius: 22px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
}

.radio-row input {
    accent-color: var(--primary);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 14px;
}

.total-row span {
    color: var(--muted);
}

.total-row strong {
    font-size: 25px;
    color: var(--danger);
}

.checkout-btn {
    width: 100%;
    border: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), #ffd43b);
    color: #211500;
    font-weight: 950;
    min-height: 56px;
    cursor: pointer;
    box-shadow: 0 16px 35px rgba(245, 159, 0, 0.25);
    font-size: 15px;
    transition: 0.22s ease;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(245, 159, 0, 0.32);
}

.secure-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
    text-align: center;
}

.summary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.summary-actions button {
    border: 1px solid rgba(30, 30, 30, 0.08);
    background: #fff;
    border-radius: 16px;
    min-height: 44px;
    font-weight: 900;
    cursor: pointer;
    color: #374151;
    transition: 0.22s ease;
}

.summary-actions button:hover {
    background: #f3f6ff;
    color: var(--primary);
}

/* =========================
   Empty Cart
========================= */

.empty-cart {
    display: none;
    text-align: center;
    padding: 46px 18px;
    background: #fff;
    border: 1px dashed rgba(30, 30, 30, 0.16);
    border-radius: 28px;
}

.empty-cart .icon {
    font-size: 54px;
    margin-bottom: 14px;
}

.empty-cart h2 {
    margin: 0 0 8px;
}

.empty-cart p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 2;
}

.empty-cart a {
    display: inline-flex;
    background: var(--primary);
    color: #fff;
    border-radius: 18px;
    padding: 13px 18px;
    font-weight: 950;
    transition: 0.22s ease;
}

.empty-cart a:hover {
    background: var(--primary-2);
    transform: translateY(-2px);
}

/* =========================
   Suggest Products
========================= */

.suggest-section {
    padding: 0 0 42px;
}

.suggest-panel {
    padding: 24px;
}

.suggest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.suggest-card {
    background: #fff;
    border: 1px solid rgba(30, 30, 30, 0.08);
    border-radius: 22px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
    transition: 0.22s ease;
}

.suggest-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.suggest-cover {
    height: 145px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    color: #fff;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 950;
    padding: 12px;
    margin-bottom: 12px;
}

.suggest-card h3 {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.7;
}

.suggest-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.suggest-bottom strong {
    color: var(--primary-2);
    font-size: 13px;
}

.suggest-bottom button {
    border: 0;
    background: #111827;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    cursor: pointer;
    transition: 0.22s ease;
}

.suggest-bottom button:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* =========================
   Responsive
========================= */

@media (max-width: 1100px) {

    .cart-hero .hero-card,
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .summary-panel {
        position: static;
    }

    .suggest-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .checkout-steps {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 82px 1fr;
        align-items: start;
    }

    .price-box,
    .qty-form,
    .remove-btn {
        grid-column: 2;
    }

    .price-box {
        text-align: right;
    }

    .remove-btn {
        width: 100%;
    }

    .cart-tools {
        grid-template-columns: 1fr;
    }

    .continue-btn {
        min-height: 48px;
    }

    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .coupon {
        flex-direction: column;
        gap: 8px;
    }

    .coupon input {
        min-height: 42px;
    }

    .coupon button {
        min-height: 44px;
    }
}

@media (max-width: 560px) {
    .breadcrumb-section {
        padding: 18px 0 10px;
    }

    .breadcrumb {
        font-size: 12px;
    }

    .cart-hero {
        padding: 10px 0 24px;
    }

    .cart-hero .hero-card,
    .cart-panel,
    .summary-panel,
    .suggest-panel {
        padding: 20px;
        border-radius: 24px;
    }

    .cart-hero .hero-card::after {
        font-size: 72px;
        left: 14px;
        bottom: -8px;
    }

    .cart-hero .hero-content h1 {
        font-size: 30px;
    }

    .cart-hero .hero-content p {
        font-size: 13px;
    }

    .cart-item {
        grid-template-columns: 74px 1fr;
        gap: 12px;
        border-radius: 20px;
        padding: 12px;
    }

    .book-cover {
        height: 100px;
        border-radius: 15px;
    }

    .item-info h3 {
        font-size: 14px;
    }

    .item-meta {
        gap: 6px;
    }

    .meta-badge {
        font-size: 11px;
        padding: 6px 8px;
    }

    .summary-actions {
        grid-template-columns: 1fr;
    }

    .suggest-grid {
        grid-template-columns: 1fr;
    }

    .total-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .total-row strong {
        font-size: 22px;
    }
}

/* =========================
   Professional Cart Section
========================= */

.cart-products-panel {
    position: relative;
    overflow: hidden;
}

.cart-products-panel::before {
    content: "";
    position: absolute;
    top: -120px;
    left: -120px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(35, 86, 216, 0.07);
    pointer-events: none;
}

.cart-panel-head {
    position: relative;
    z-index: 1;
}

.cart-panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 950;
    margin-bottom: 8px;
}

.pro-cart-list {
    position: relative;
    z-index: 1;
}

.pro-cart-item {
    grid-template-columns: 150px 1fr;
    gap: 18px;
    padding: 16px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(35, 86, 216, 0.07), transparent 34%),
        #fff;
}

.pro-cart-image {
    height: 205px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #2356d8);
    display: block;
    position: relative;
    box-shadow: 0 16px 34px rgba(16, 24, 40, 0.12);
}

.pro-cart-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: 0.35s ease;
}

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

.pro-cart-image-placeholder {
    height: 100%;
    color: #fff;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 16px;
}

.pro-cart-image-placeholder span {
    font-size: 12px;
    opacity: 0.75;
}

.pro-cart-image-placeholder strong {
    font-size: 15px;
    line-height: 1.8;
}

.pro-cart-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

.pro-cart-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.pro-cart-title-row h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.8;
    color: #111827;
}

.pro-cart-title-row h3 a:hover {
    color: var(--primary);
}

.pro-cart-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pro-cart-meta span {
    background: #f8fafc;
    border: 1px solid rgba(30, 30, 30, 0.06);
    color: var(--muted);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
}

.pro-remove-btn {
    flex: 0 0 auto;
}

.pro-cart-bottom {
    display: grid;
    grid-template-columns: 150px 170px 170px;
    gap: 12px;
    align-items: end;
}

.pro-price-area,
.pro-row-total {
    background: #f8fafc;
    border: 1px solid rgba(30, 30, 30, 0.06);
    border-radius: 18px;
    padding: 13px;
    display: grid;
    gap: 6px;
    min-height: 78px;
}

.pro-price-area span,
.pro-row-total span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.pro-price-area strong {
    color: var(--primary-2);
    font-size: 15px;
    font-weight: 950;
}

.pro-row-total strong {
    color: var(--danger);
    font-size: 16px;
    font-weight: 950;
}

.pro-qty-form {
    gap: 8px;
}

.pro-qty {
    height: 46px;
    border-radius: 16px;
}

.pro-cart-tools {
    position: relative;
    z-index: 1;
    align-items: stretch;
}

.pro-coupon {
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.04);
}

.remove-coupon-btn {
    border: 0;
    background: #fff0f0;
    color: var(--danger);
    border-radius: 16px;
    padding: 12px 16px;
    font-weight: 950;
    cursor: pointer;
    transition: 0.22s ease;
}

.remove-coupon-btn:hover {
    background: var(--danger);
    color: #fff;
}

/* Summary Pro */

.pro-summary-panel {
    overflow: hidden;
}

.summary-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.summary-title>span {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 23px;
    box-shadow: 0 14px 30px rgba(35, 86, 216, 0.22);
}

.summary-title h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.summary-title p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.pro-total-row {
    background: linear-gradient(135deg, #fff7ed, #fff);
    border: 1px solid #fed7aa;
    border-radius: 22px;
    padding: 16px;
}

.cart-trust-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 14px;
}

.cart-trust-box span {
    background: #f8fafc;
    border: 1px solid rgba(30, 30, 30, 0.06);
    color: #374151;
    border-radius: 15px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 850;
}

/* Responsive */

@media (max-width: 1100px) {
    .pro-cart-bottom {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 820px) {
    .pro-cart-item {
        grid-template-columns: 120px 1fr;
    }

    .pro-cart-image {
        height: 170px;
    }

    .pro-cart-bottom {
        grid-template-columns: 1fr;
    }

    .pro-price-area,
    .pro-row-total {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .pro-cart-item {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .pro-cart-image {
        height: 260px;
    }

    .pro-cart-title-row {
        flex-direction: column;
    }

    .pro-remove-btn {
        width: 100%;
    }

    .pro-cart-meta span {
        width: 100%;
    }

    .pro-coupon {
        flex-direction: column;
    }

    .pro-coupon button,
    .remove-coupon-btn {
        width: 100%;
        min-height: 44px;
    }
}
