/* Selltela Product & Checkout Styles */

/* --- Product Page Layout --- */
.product-page-wrapper {
    min-height: 100vh;
    width: 100%;
    padding-top: 100px !important;
    padding-bottom: 200px !important;
    /* Increased for global footer */
    padding-left: 15px;
    padding-right: 15px;
    background: #fcfcfc;
    box-sizing: border-box;
}

.selar-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.selar-top-section {
    display: block;
    margin-bottom: 40px;
}

.selar-image-col {
    width: 100%;
    margin-bottom: 20px;
}

.selar-summary-col {
    width: 100%;
}

@media (min-width: 801px) {
    .selar-top-section {
        display: flex;
        gap: 40px;
        align-items: flex-start;
    }

    .selar-image-col {
        flex: 1;
        margin-bottom: 0;
        position: sticky;
        top: 120px;
    }

    .selar-summary-col {
        flex: 0.9;
    }
}

.selar-main-image {
    width: 100%;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    background: #fff;
    object-fit: cover;
}

.selar-summary-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
}

.selar-badge {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

.selar-title {
    font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 700;
    color: #202124;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 15px;
    text-transform: none;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.selar-seller-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.seller-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e8f0fe;
    color: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    margin-right: 10px;
}

.seller-name {
    font-size: 13px;
    color: #5f6368;
    font-weight: 500;
}

.selar-short-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #5f6368;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-link {
    color: #1a73e8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    margin-bottom: 20px;
}

.selar-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.selar-price-display {
    font-size: 24px;
    font-weight: 700;
    color: #202124;
}

.selar-btn-buy {
    background: #1a73e8;
    color: white !important;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    text-decoration: none !important;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(26, 115, 232, 0.2);
    display: inline-block;
}

.selar-btn-buy:hover {
    background: #1557b0;
    box-shadow: 0 6px 8px rgba(26, 115, 232, 0.3);
}

/* --- Bottom Section & Details --- */
.selar-bottom-section {
    margin-top: 40px;
}

.selar-details-header {
    font-size: 18px;
    font-weight: 700;
    color: #202124;
    margin-bottom: 20px;
}

.selar-rating-score {
    font-size: clamp(28px, 3vw, 34px);
    margin: 0;
    font-weight: 700;
    color: #202124;
    line-height: 1.1;
}

.selar-full-desc-card {
    background: #fff;
    padding: 0;
    font-size: 15px;
    line-height: 1.8;
    color: #3c4043;
}

.selar-custom-footer {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 13px;
    margin-top: 40px;
    border-top: 1px solid #eee;
    background: #fcfcfc;
    width: 100%;
}

/* --- Checkout Slide-Over Modal --- */
.checkout-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(2px);
}

.checkout-backdrop.show {
    display: block;
}

.checkout-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    z-index: 9999;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.checkout-modal.show {
    transform: translateX(0);
}

.checkout-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.checkout-item {
    display: flex;
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 1px solid #f9f9f9;
}

/* --- Checkout Page (Standard Layout) --- */
.checkout-page-container {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.checkout-branding h4 {
    font-size: 1.5rem;
    color: #333;
}

/* Card Styling for Checkout */
.card {
    border-radius: 12px;
}

.card-header {
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

/* Ensure focus states match theme */
.form-control:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

/* Form Styles */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 20px;
}

.form-control-lg {
    height: 48px;
    font-size: 16px;
    border-radius: 6px;
}

.pay-btn.btn-lg {
    height: 54px;
    font-size: 18px;
    margin-top: 30px;
}

/* Summary Styles */
.summary-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 25px;
}

.summary-product-item {
    display: flex;
    margin-bottom: 25px;
}

.summary-thumb {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    margin-right: 20px;
    flex-shrink: 0;
}

.summary-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-thumb.spacer {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.summary-product-info {
    flex-grow: 1;
}

.summary-product-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 4px;
}

.summary-product-qty {
    font-size: 0.9rem;
    color: #666;
}

.summary-product-price {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    margin-left: 15px;
}

.summary-totals {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a73e8;
}

/* --- Checkout Page (Full View) --- */
.checkout-wrapper {
    min-height: 100vh;
    padding: 40px 15px;
    padding-bottom: 200px !important;
    /* Increased for global footer */
    display: flex;
    justify-content: center;
    background-color: #f0f2f5;
}

.checkout-card {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    padding: 30px;
}

/* --- Form Elements for Checkout --- */
.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #5f6368;
    margin-bottom: 8px;
}

.pay-btn {
    width: 100%;
    background: #1a73e8;
    color: white;
    height: 50px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(50, 50, 93, .11);
    transition: all 0.15s ease;
}

.pay-btn:hover {
    background-color: #1557b0;
    transform: translateY(-1px);
}

.payment-option-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.payment-option-card.active {
    border-color: #1a73e8;
    background-color: #f8f9fa;
}

.secure-badge {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #8898aa;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Dashboard Headers & Typography --- */
.selltela-page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #202124;
    letter-spacing: -0.2px;
}

.selltela-dashboard-section-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #5f6368 !important;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
}

/* --- Mobile Responsiveness Enhancements --- */
@media (max-width: 768px) {
    .selar-title {
        font-size: clamp(18px, 5.4vw, 22px);
        margin-bottom: 12px;
    }

    .selar-details-header {
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .selar-rating-score {
        font-size: 24px;
    }

    .selar-short-desc,
    .selar-full-desc-card,
    .summary-product-title,
    .summary-product-qty {
        font-size: 13px;
        line-height: 1.5;
    }

    .selltela-page-title {
        font-size: 1rem;
    }

    .selltela-dashboard-wrapper {
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 200px !important;
    }

    .selltela-stat-card {
        margin-bottom: 12px;
    }

    .selltela-stat-card .card-body {
        padding: 1rem;
    }

    .selltela-stat-card .card-title {
        font-size: 0.85rem;
    }

    .selltela-stat-card .card-text {
        font-size: 1.1rem;
    }

    /* Traditional Slim Table Strategy */
    .table-responsive {
        border: none !important;
        overflow-x: hidden !important;
        /* Force no horizontal scroll */
        padding: 0 !important;
    }

    .table {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    .table td,
    .table th {
        padding: 8px 4px !important;
        font-size: 11px !important;
        vertical-align: middle !important;
    }

    /* Hide only non-essential columns to save space, but show image */
    .table th:nth-child(4),
    .table td:nth-child(4),
    /* Sales or Views */
    .table th:nth-child(5),
    .table td:nth-child(5)

    /* Status or Sales */
        {
        display: none !important;
    }

    /* Keep image column very small */
    .table th:nth-child(1),
    .table td:nth-child(1) {
        width: 45px !important;
        padding-right: 2px !important;
    }

    .table td:nth-child(1) div,
    .table td:nth-child(1) img {
        width: 32px !important;
        height: 32px !important;
    }

    /* Ensure product title wraps but doesn't break layout */
    .table td[data-label="Product"] {
        max-width: 140px;
        word-wrap: break-word;
        white-space: normal !important;
    }

    .table td[data-label="Product"] strong {
        font-size: 11px;
        display: block;
    }

    /* Compact buttons */
    .btn-sm {
        padding: 4px 6px !important;
        font-size: 10px !important;
    }
}


/* --- Dashboard & Generic Page Wrappers --- */
.sell-dashboard,
.selltela-dashboard-wrapper {
    min-height: calc(100vh - 64px);
    /* Account for header */
    padding-top: 20px;
    padding-bottom: 150px;
    /* Large padding to ensure footer visibility */
    background: #fcfcfc;
}

.selltela-scope main {
    padding-bottom: 100px;
}

/* Stat Cards for Dashboard */
.selltela-stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    overflow: hidden;
    position: relative;
    background: white;
}

.selltela-stat-card:hover {
    transform: translateY(-5px);
}

.stat-border-primary {
    border-left: 4px solid #1a73e8;
}

.stat-border-success {
    border-left: 4px solid #34a853;
}

.stat-border-info {
    border-left: 4px solid #4285f4;
}

.selltela-stat-card .icon-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 80px;
    opacity: 0.05;
    color: #000;
}

/* Table styling for Dashboard */
.table-responsive.bg-white {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.thead-light th {
    background-color: #f8f9fa;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #5f6368;
    border-bottom: 1px solid #eee;
}

/* --- Bliteoc Custom Notification System --- */
#bliteoc-toast-container {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.bliteoc-toast {
    min-width: 280px;
    max-width: 90%;
    background-color: #323232;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 12px 18px;
    font-size: 14px;
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    animation: bliteoc-toast-in 0.3s cubic-bezier(0, 0, 0.2, 1);
    pointer-events: auto;
}

.bliteoc-toast.success::before {
    content: "check_circle";
    font-family: 'Material Icons';
    margin-right: 12px;
    color: #81c995;
}

.bliteoc-toast.error::before {
    content: "error";
    font-family: 'Material Icons';
    margin-right: 12px;
    color: #f28b82;
}

.bliteoc-toast.warning::before {
    content: "warning";
    font-family: 'Material Icons';
    margin-right: 12px;
    color: #fdd663;
}

@keyframes bliteoc-toast-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bliteoc-toast.fade-out {
    animation: bliteoc-toast-out 0.3s ease-in forwards;
}

@keyframes bliteoc-toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Custom Confirmation Modal */
.bliteoc-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bliteoc-confirm-overlay.show {
    opacity: 1;
    display: flex;
}

.bliteoc-confirm-card {
    background: #fff;
    width: 90%;
    max-width: 320px;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0, 0, 0.2, 1);
}

.bliteoc-confirm-overlay.show .bliteoc-confirm-card {
    transform: scale(1);
}

.bliteoc-confirm-title {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 12px;
}

.bliteoc-confirm-text {
    font-size: 14px;
    color: #5f6368;
    line-height: 1.5;
    margin-bottom: 24px;
}

.bliteoc-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.bliteoc-confirm-btn {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: transparent;
    text-transform: uppercase;
    letter-spacing: .25px;
    transition: background-color 0.2s;
}

.bliteoc-confirm-btn.cancel {
    color: #1a73e8;
}

.bliteoc-confirm-btn.cancel:hover {
    background-color: rgba(26, 115, 232, 0.04);
}

.bliteoc-confirm-btn.confirm {
    color: #d93025;
}

.bliteoc-confirm-btn.confirm:hover {
    background-color: rgba(217, 48, 37, 0.04);
}
