/*
 * Cart, mini cart and checkout styles.
 * Follows the design of the product detail page (product-detail.blade.php).
 */

/* ---------- menu cart icon ---------- */
ul.navbar-nav > li.nav-cart-item > a {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

ul.navbar-nav > li.nav-cart-item > a i {
    font-size: 1.15rem;
}

.nav-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #ff6c00;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    box-shadow: 0 4px 10px rgba(255, 108, 0, 0.35);
}

.nav-cart-item.is-bumped .nav-cart-badge {
    animation: shopBadgeBump 0.45s ease;
}

@keyframes shopBadgeBump {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

@media (max-width: 991px) {
    ul.navbar-nav > li.nav-cart-item > a i {
        float: none;
        background: transparent;
        padding: 0;
        margin-top: 0;
    }
}

/* ---------- buttons ---------- */
.shop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    border-radius: 12px;
    padding: 0 22px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.shop-btn:hover,
.shop-btn:focus {
    text-decoration: none;
}

.shop-btn-primary {
    background: linear-gradient(135deg, #ff6c00 0%, #ff8f3a 100%);
    color: #fff;
    box-shadow: 0 12px 26px rgba(255, 108, 0, 0.3);
}

.shop-btn-primary:hover:not(:disabled),
.shop-btn-primary:focus:not(:disabled) {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(255, 108, 0, 0.38);
    filter: brightness(1.04);
}

.shop-btn-primary:disabled,
.shop-btn-primary.is-disabled {
    background: #b8c3d4;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.shop-btn-secondary {
    background: #fff;
    color: #003087;
    border: 1px solid rgba(0, 86, 214, 0.25);
}

.shop-btn-secondary:hover,
.shop-btn-secondary:focus {
    background: #eef3fb;
    color: #133a78;
}

.shop-btn-danger {
    background: #c0392b;
    color: #fff;
    box-shadow: 0 10px 22px rgba(192, 57, 43, 0.25);
}

.shop-btn-danger:hover,
.shop-btn-danger:focus {
    color: #fff;
    filter: brightness(1.08);
}

.shop-btn-block {
    width: 100%;
}

.shop-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fdecea;
    color: #c0392b;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.shop-icon-btn:hover,
.shop-icon-btn:focus {
    background: #c0392b;
    color: #fff;
}

.shop-btn.is-loading,
.shop-icon-btn.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

/* ---------- quantity stepper (same as on the product page) ---------- */
.shop-qty {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(0, 86, 214, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.shop-qty button {
    width: 36px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #003087;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.shop-qty button:hover:not(:disabled) {
    background: #eef3fb;
}

.shop-qty button:disabled {
    color: #b8c3d4;
    cursor: not-allowed;
}

.shop-qty input {
    width: 46px;
    height: 40px;
    border: 0;
    text-align: center;
    font-weight: 700;
    color: #22324a;
    -moz-appearance: textfield;
    appearance: textfield;
}

.shop-qty input::-webkit-outer-spin-button,
.shop-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---------- mini cart (bootstrap modal) ---------- */
.mc-modal .modal-dialog {
    max-width: 560px;
}

.mc-modal .modal-content {
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
}

.mc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #3c7fdc 0%, #6aa7f3 100%);
    color: #fff;
    padding: 18px 22px;
}

.mc-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.mc-header h2 i {
    margin-right: 8px;
    opacity: 0.9;
}

.mc-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mc-close:hover {
    background: #ff6c00;
}

.mc-body {
    padding: 18px 22px 6px;
    max-height: min(60vh, 520px);
    overflow-y: auto;
}

.mc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.mc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid rgba(0, 86, 214, 0.12);
    border-radius: 14px;
    padding: 10px 12px;
    transition: opacity 0.2s ease;
}

.mc-item.is-removing {
    opacity: 0.4;
}

.mc-thumb {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 10px;
    overflow: hidden;
    background: #eef3fb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a99b0;
}

.mc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mc-info {
    flex: 1;
    min-width: 0;
}

.mc-name {
    display: block;
    color: #003087;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.3;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mc-name:hover {
    color: #ff6c00;
    text-decoration: none;
}

.mc-meta {
    font-size: 0.82rem;
    color: #6e7d94;
    margin-top: 2px;
}

.mc-line-total {
    font-weight: 800;
    color: #22324a;
    white-space: nowrap;
    font-size: 0.95rem;
}

.mc-empty {
    text-align: center;
    padding: 30px 10px;
    color: #6e7d94;
}

.mc-empty i {
    display: block;
    font-size: 2.6rem;
    color: #b8c3d4;
    margin-bottom: 12px;
}

.mc-footer {
    padding: 14px 22px 22px;
}

.mc-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    background: #eef3fb;
    border: 1px solid rgba(0, 86, 214, 0.14);
    border-radius: 12px;
    padding: 12px 16px;
}

.mc-total-label {
    font-weight: 700;
    color: #22324a;
}

.mc-total-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ff6c00;
}

.mc-note {
    font-size: 0.8rem;
    color: #6e7d94;
    margin: 8px 2px 14px;
}

.mc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mc-actions .shop-btn {
    flex: 1 1 200px;
}

.mc-loading {
    text-align: center;
    color: #6e7d94;
    padding: 30px 0;
}

/* ---------- confirmation dialog (above bootstrap modals) ---------- */
.shop-confirm {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(6, 15, 34, 0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.shop-confirm.is-open {
    opacity: 1;
    visibility: visible;
}

.shop-confirm-dialog {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
    transform: scale(0.96);
    transition: transform 0.2s ease;
}

.shop-confirm.is-open .shop-confirm-dialog {
    transform: scale(1);
}

.shop-confirm-header {
    background: linear-gradient(135deg, #3c7fdc 0%, #6aa7f3 100%);
    color: #fff;
    padding: 16px 22px;
    font-weight: 700;
    font-size: 1.05rem;
}

.shop-confirm-header i {
    margin-right: 8px;
}

.shop-confirm-body {
    padding: 22px;
    color: #44536a;
    line-height: 1.6;
}

.shop-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 22px 22px;
}

.shop-confirm-actions .shop-btn {
    flex: 1 1 160px;
}

/* ---------- checkout pages ---------- */
.shop-section {
    padding: 60px 0 80px;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 108, 0, 0.16), transparent 38%),
        radial-gradient(circle at 100% 20%, rgba(0, 48, 135, 0.15), transparent 42%),
        linear-gradient(180deg, #f8f9fa 0%, #edf1f7 100%);
}

.shop-main-card {
    background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
    border-radius: 20px;
    border: 1px solid rgba(0, 48, 135, 0.08);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.08),
        0 6px 14px rgba(0, 0, 0, 0.05);
    padding: 24px 28px;
    margin: -36px 0 28px;
    position: relative;
    z-index: 2;
}

.shop-title {
    color: #003087;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 16px;
}

.shop-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: shopStep;
}

.shop-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 6px;
    border-radius: 20px;
    background: #eef3fb;
    color: #6e7d94;
    font-size: 0.85rem;
    font-weight: 700;
}

.shop-step::before {
    counter-increment: shopStep;
    content: counter(shopStep);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #2a63b9;
}

.shop-step.is-active {
    background: #ff6c00;
    color: #fff;
}

.shop-step.is-active::before {
    color: #ff6c00;
}

.shop-step.is-done {
    background: #dfeafc;
    color: #133a78;
}

.shop-grid {
    row-gap: 24px;
}

.shop-box {
    padding: 0;
    background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(0, 48, 135, 0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.05);
}

.shop-box + .shop-box {
    margin-top: 24px;
}

.shop-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, #3c7fdc 0%, #6aa7f3 100%);
    color: #fff;
    padding: 18px 22px;
}

.shop-box-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.shop-box-header h2 i {
    margin-right: 8px;
    opacity: 0.9;
}

.shop-box-header a {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: underline;
}

.shop-box-content {
    padding: 22px;
    color: #44536a;
    line-height: 1.6;
}

.shop-sticky {
    position: sticky;
    top: 20px;
}

/* cart lines */
.shop-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.shop-line {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid rgba(0, 86, 214, 0.12);
    border-radius: 14px;
    padding: 12px 14px;
    transition: opacity 0.2s ease;
}

.shop-line.is-static {
    grid-template-columns: 60px minmax(0, 1fr) auto auto;
}

.shop-line.is-static .shop-line-thumb {
    width: 60px;
    height: 60px;
}

/* no image, no editing (payment page) */
.shop-line.is-compact {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: none;
}

.shop-line.is-compact > * {
    grid-area: auto;
}

.shop-line.is-busy {
    opacity: 0.55;
    pointer-events: none;
}

.shop-line-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    background: #eef3fb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a99b0;
    font-size: 1.4rem;
}

.shop-line-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-line-name {
    display: block;
    color: #003087;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

.shop-line-name:hover {
    color: #ff6c00;
    text-decoration: none;
}

.shop-line-meta {
    font-size: 0.82rem;
    color: #6e7d94;
    margin-top: 3px;
}

.shop-line-meta .shop-pill {
    margin-left: 6px;
}

.shop-line-total {
    font-weight: 800;
    color: #22324a;
    min-width: 90px;
    text-align: right;
    white-space: nowrap;
}

.shop-line-qty-static {
    font-weight: 700;
    color: #22324a;
    white-space: nowrap;
}

.shop-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 9px;
    border-radius: 20px;
    background: #eef3fb;
    color: #2a63b9;
}

.shop-lines-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    background: #eef3fb;
    border: 1px solid rgba(0, 86, 214, 0.14);
    border-radius: 12px;
    font-weight: 700;
    color: #22324a;
}

.shop-lines-total strong {
    font-size: 1.35rem;
    color: #ff6c00;
}

.shop-empty {
    text-align: center;
    padding: 40px 10px;
}

.shop-empty i {
    font-size: 3rem;
    color: #b8c3d4;
    margin-bottom: 14px;
}

.shop-empty h3 {
    color: #003087;
    font-weight: 800;
    font-size: 1.35rem;
}

.shop-empty p {
    color: #6e7d94;
}

/* forms */
.shop-form-note {
    font-size: 0.88rem;
    color: #6e7d94;
    margin-bottom: 18px;
}

.shop-form-note i {
    color: #3c7fdc;
    margin-right: 6px;
}

.shop-field {
    margin-bottom: 16px;
}

.shop-field label {
    display: block;
    font-weight: 600;
    color: #22324a;
    font-size: 0.88rem;
    margin-bottom: 6px;
}

.shop-field label .is-required {
    color: #ff6c00;
}

.shop-field .form-control {
    height: auto;
    min-height: 48px;
    border: 1px solid rgba(0, 86, 214, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #22324a;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.shop-field .form-control:focus {
    border-color: #3c7fdc;
    box-shadow: 0 0 0 3px rgba(60, 127, 220, 0.15);
}

.shop-field .form-control.is-invalid {
    border-color: #c0392b;
}

.shop-field-hint {
    font-size: 0.78rem;
    color: #6e7d94;
    margin-top: 4px;
}

.shop-field-error {
    font-size: 0.82rem;
    color: #c0392b;
    margin-top: 5px;
}

.shop-link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.shop-auth-links {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed rgba(0, 86, 214, 0.2);
    display: grid;
    gap: 10px;
    font-size: 0.92rem;
}

.shop-auth-links a {
    color: #2a63b9;
    font-weight: 700;
}

.shop-auth-links a:hover {
    color: #ff6c00;
}

/* option cards (shipping / payment) */
.shop-options {
    display: grid;
    gap: 10px;
}

.shop-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid rgba(0, 86, 214, 0.14);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.shop-option:hover {
    border-color: rgba(0, 86, 214, 0.35);
}

.shop-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shop-option-check {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #b8c3d4;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.shop-option input:checked ~ .shop-option-check {
    border: 7px solid #ff6c00;
}

.shop-option input:focus-visible ~ .shop-option-check {
    box-shadow: 0 0 0 4px rgba(255, 108, 0, 0.2);
}

.shop-option:has(input:checked) {
    border-color: #ff6c00;
    background: #fff8f2;
    box-shadow: 0 8px 20px rgba(255, 108, 0, 0.12);
}

.shop-option-body {
    flex: 1;
    min-width: 0;
}

.shop-option-name {
    display: block;
    font-weight: 700;
    color: #22324a;
}

.shop-option-meta {
    display: block;
    font-size: 0.82rem;
    color: #6e7d94;
}

.shop-option-price {
    font-weight: 800;
    color: #22324a;
    white-space: nowrap;
}

.shop-option-icon {
    color: #3c7fdc;
    font-size: 1.3rem;
    width: 26px;
    text-align: center;
}

.shop-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eef3fb;
    color: #22324a;
    font-size: 0.9rem;
}

.shop-notice i {
    color: #3c7fdc;
    margin-top: 3px;
}

.shop-notice.is-warning {
    background: #fff3e9;
}

.shop-notice.is-warning i {
    color: #c65400;
}

.shop-notice.is-success {
    background: #e8f6ee;
}

.shop-notice.is-success i {
    color: #1f8a4c;
}

/* addresses */
.shop-address {
    font-style: normal;
    color: #44536a;
    line-height: 1.6;
    font-size: 0.92rem;
}

.shop-address-title {
    font-weight: 700;
    color: #22324a;
    margin-bottom: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* totals */
.shop-totals {
    margin: 0;
    display: grid;
    gap: 8px;
    transition: opacity 0.2s ease;
}

.shop-totals.is-loading {
    opacity: 0.5;
}

.shop-total-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
}

.shop-total-row dt {
    font-weight: 600;
    color: #44536a;
}

.shop-total-row dd {
    margin: 0;
    font-weight: 700;
    color: #22324a;
    white-space: nowrap;
}

.shop-total-row.is-subtotal {
    border-top: 1px dashed rgba(0, 86, 214, 0.2);
    padding-top: 8px;
}

.shop-total-row.is-grand {
    align-items: baseline;
    margin-top: 6px;
    padding: 14px 16px;
    background: #eef3fb;
    border: 1px solid rgba(0, 86, 214, 0.14);
    border-radius: 12px;
}

.shop-total-row.is-grand dt {
    color: #22324a;
    font-weight: 800;
}

.shop-total-row.is-grand dd {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ff6c00;
}

.shop-terms {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 18px 0;
    font-size: 0.9rem;
    color: #44536a;
    cursor: pointer;
}

.shop-terms input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: #ff6c00;
    flex: 0 0 auto;
}

.shop-terms a {
    color: #2a63b9;
    font-weight: 700;
}

.shop-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: #2a63b9;
    font-weight: 600;
    font-size: 0.9rem;
}

.shop-back-link:hover {
    color: #ff6c00;
}

.shop-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(255, 108, 0, 0.25);
    border-top-color: #ff6c00;
    animation: shopSpin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes shopSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 991.98px) {
    .shop-main-card {
        margin-top: -26px;
        padding: 20px 22px;
    }

    .shop-sticky {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .shop-line {
        grid-template-columns: 60px minmax(0, 1fr) auto;
        grid-template-areas:
            "thumb info remove"
            "thumb qty total";
        row-gap: 10px;
    }

    .shop-line-thumb {
        grid-area: thumb;
        width: 60px;
        height: 60px;
        align-self: start;
    }

    .shop-line.is-static {
        grid-template-columns: 60px minmax(0, 1fr) auto;
        grid-template-areas:
            "thumb info info"
            "thumb qty total";
    }

    .shop-line-info { grid-area: info; }
    .shop-line-qty,
    .shop-line-qty-static { grid-area: qty; }
    .shop-line-total { grid-area: total; min-width: 0; }
    .shop-line-remove { grid-area: remove; justify-self: end; }
}

@media (max-width: 575.98px) {
    .shop-section {
        padding: 44px 0 64px;
    }

    .shop-main-card {
        border-radius: 14px;
        margin-top: -20px;
        padding: 16px;
    }

    .shop-title {
        font-size: 1.45rem;
    }

    .shop-box-header,
    .shop-box-content,
    .mc-header,
    .mc-body,
    .mc-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mc-item {
        flex-wrap: wrap;
    }

    .shop-total-row.is-grand dd {
        font-size: 1.35rem;
    }
}
