/* ====== PRODUCTS PAGE STYLES ====== */
/* Shared styles for ID Cards, Holders, and Lanyards pages */

/* ====== PAGE HERO ====== */
.page-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.page-hero .badge-soft {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ====== PRODUCT CARD ====== */
/* Force active state visibility */
.btn-outline-primary.active,
.btn-outline-primary.active:hover {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    border-color: #0d6efd !important;
}

/* Ensure non-active buttons remain visible */
.btn-outline-primary:not(.active) {
    background-color: transparent !important;
    color: #0d6efd !important;
}

.btn-outline-primary:not(.active):hover {
    background-color: rgba(13, 110, 253, 0.1) !important;
    color: #0d6efd !important;
}

.product-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10) !important;
}

.product-image-wrapper {
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: #f8f9fa;
    position: relative;
}

.product-image-wrapper img {
    transition: transform 0.4s ease;
    height: 220px;
    width: 100%;
    object-fit: contain;
    padding: 15px;
    background: #f8f9fa;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.03);
}

.product-badge .badge {
    animation: fadeIn 0.5s ease;
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
}

.quick-view-btn {
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.product-card:hover .quick-view-btn {
    opacity: 1;
}

.quick-view-btn:hover {
    background: #0d6efd !important;
    color: white !important;
}

.description-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.product-price {
    font-size: 1.1rem;
}

/* ====== STEPPER STYLES ====== */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 1rem;
}

.stepper-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: #dee2e6;
    z-index: 0;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.stepper-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stepper-item.active .stepper-number {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.stepper-item.completed .stepper-number {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.stepper-label {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
}

.stepper-item.active .stepper-label {
    color: #0d6efd;
    font-weight: 600;
}

.stepper-item.completed .stepper-label {
    color: #28a745;
}

.step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== CARD SELECTION GRID ====== */
.card-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.card-option {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.card-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #ced4da;
}

.card-option.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.card-option img {
    max-width: 100%;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8f9fa;
    padding: 4px;
}

.card-option .card-name {
    font-weight: 600;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.card-option .card-price {
    font-size: 0.75rem;
    color: #0d6efd;
    font-weight: 500;
}

/* ====== QUANTITY CONTROLS ====== */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quantity-control button:hover {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.quantity-control .quantity-value {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 35px;
    text-align: center;
}

/* ====== COLOR PICKER ====== */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0d6efd;
}

.color-option input[type="color"] {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

.color-option .custom-label {
    font-size: 10px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* ====== UPLOAD AREA ====== */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafbfc;
}

.upload-area:hover {
    border-color: #0d6efd;
    background: #f0f7ff;
}

.upload-area.dragover {
    border-color: #0d6efd;
    background: #e8f0fe;
}

.upload-area .upload-icon {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.upload-area .upload-text {
    font-weight: 500;
    color: #212529;
    font-size: 0.95rem;
}

.upload-area .upload-subtext {
    font-size: 0.8rem;
    color: #6c757d;
}

.file-list {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.file-item {
    background: #e9ecef;
    padding: 0.25rem 0.7rem;
    border-radius: 16px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.file-item .remove-file {
    cursor: pointer;
    color: #dc3545;
    font-weight: 700;
    font-size: 1rem;
    background: none;
    border: none;
}

/* ====== ORDER SUMMARY ====== */
.order-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.2rem;
    /* position: sticky; */
    top: 100px;
}

.order-summary .summary-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #212529;
}

.order-summary .summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.order-summary .summary-item:last-child {
    border-bottom: none;
}

.order-summary .summary-item .label {
    color: #6c757d;
}

.order-summary .summary-item .value {
    font-weight: 500;
}

.order-summary .summary-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d6efd;
}

/* ====== BUTTONS ====== */
.btn-step {
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: none;
}

.btn-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.btn-step-primary {
    background: #0d6efd;
    color: #fff;
}

.btn-step-primary:hover {
    background: #0b5ed7;
    color: #fff;
}

.btn-step-secondary {
    background: #e9ecef;
    color: #495057;
}

.btn-step-secondary:hover {
    background: #dee2e6;
    color: #212529;
}

.btn-step-success {
    background: #28a745;
    color: #fff;
}

.btn-step-success:hover {
    background: #1e7e34;
    color: #fff;
}

/* ====== MODAL STYLES ====== */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 1.2rem 1.5rem 0.5rem;
    border-bottom: none;
}

.modal-header .modal-title {
    font-size: 1.1rem;
}

.modal-body {
    padding: 0.5rem 1.5rem 1.5rem;
}

/* ====== LOGIN REQUIRED MODAL ====== */
.login-required-modal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.login-required-modal .modal-body {
    padding: 2rem;
}

.login-required-modal .login-icon {
    font-size: 4rem;
    color: #0d6efd;
}

.login-required-modal .login-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.login-required-modal .login-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.login-required-modal .btn-login {
    padding: 0.7rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
}

.login-required-modal .btn-signup {
    padding: 0.7rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 992px) {
    .order-summary {
        position: static;
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 1.8rem;
    }

    .product-image-wrapper img {
        height: 160px !important;
    }

    #quickViewImage {
        height: 180px !important;
    }

    .card-selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .stepper-wrapper::before {
        left: 30px;
        right: 30px;
    }

    .stepper-label {
        font-size: 0.65rem;
    }

    .stepper-number {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .card-selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .card-option img {
        height: 60px;
    }

    .card-option .card-name {
        font-size: 0.7rem;
    }

    .color-option {
        width: 28px;
        height: 28px;
    }
}


/*============================================================LOADING EFFECTS============================================================*/
/* ============================================================
   IMAGE SKELETON SHIMMER
   ============================================================ */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
    background-image: linear-gradient(90deg,
            #f0f0f0 0%,
            #e8e8e8 50%,
            #f0f0f0 100%);
    background-size: 200% 100%;
    background-position: -100% 0;
    background-repeat: no-repeat;
    animation: shimmerWave 1.6s infinite linear;
}

.product-image-wrapper.loaded {
    animation: none;
    background: #f8f9fa;
    background-image: none;
}

.product-image-wrapper img {
    opacity: 0;
    transition: opacity 0.4s ease;
    position: relative;
    z-index: 1;
}

.product-image-wrapper.loaded img {
    opacity: 1;
}

@keyframes shimmerWave {
    0% {
        background-position: -100% 0;
    }

    100% {
        background-position: 100% 0;
    }
}

/* ============================================================
   BUTTON SPINNER
   ============================================================ */
.btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    vertical-align: -0.15em;
}

@media (min-width: 576px) {
    .modal-sm {
        --bs-modal-width: 30% !important;
    }
}