/* Booking Flow Styles */

/* Theme Color Variables - Will be overridden by inline styles */
:root {
    --booking-primary-color: #0d6efd;
    --booking-secondary-color: #6c757d;
    --booking-success-color: #198754;
    --booking-warning-color: #ffc107;
    --booking-danger-color: #dc3545;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner.sm {
    width: 12px;
    height: 12px;
    border-width: 1.5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth transitions */
.transition-all {
    transition: all 0.2s ease;
}

/* Mobile-specific classes */
.mobile-device .calendar-day.touch-active {
    background-color: rgba(2, 132, 199, 0.1);
    transform: scale(0.95);
}

.mobile-device .time-slot.touch-active {
    background-color: rgba(2, 132, 199, 0.1);
    transform: scale(0.95);
}

.mobile-device .product-card.touch-active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mobile-device .calendar-nav-btn.active {
    background-color: #e9ecef;
    transform: scale(0.95);
}

/* Keyboard open adjustments */
.keyboard-open {
    height: 100vh;
    overflow: hidden;
}

.keyboard-open .booking-summary-mobile {
    display: none;
}

/* Rotation animations */
.rotate-180 {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* Mobile loading states */
.mobile-device .loading-spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Mobile accessibility improvements */
.mobile-device .btn {
    min-height: 44px;
    min-width: 44px;
}

.mobile-device .form-check-input {
    min-width: 20px;
    min-height: 20px;
}

.mobile-device .calendar-day {
    min-height: 44px;
}

.mobile-device .time-slot {
    min-height: 48px;
}

/* Calendar specific styles */
.calendar-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: between;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f8f9fa;
}

.calendar-nav-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
}

.calendar-nav-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.calendar-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e5e7eb;
    border-radius: 0 0 0.5rem 0.5rem;
    overflow: hidden;
}

#calendar-days {
    display: contents;
}

.calendar-day-header {
    background-color: #f8f9fa;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
}

.calendar-day {
    background-color: white;
    min-height: 4rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.25rem;
}

.calendar-day:hover {
    background-color: #f8f9fa;
    transform: scale(1.02);
}

.calendar-day.available {
    background-color: rgba(34, 197, 94, 0.05);
    border: 2px solid rgba(34, 197, 94, 0.2);
}

.calendar-day.available:hover {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.4);
}

.calendar-day.selected {
    background-color: #22c55e !important;
    color: white !important;
    border-color: #22c55e !important;
    font-weight: 600;
}

.calendar-day.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f9fafb;
}

.calendar-day.other-month {
    color: #9ca3af;
    background-color: #f9fafb;
}

.calendar-day.other-month:hover {
    background-color: #f9fafb;
    transform: none;
}

.calendar-day.today {
    background-color: #dbeafe;
    border: 2px solid #3b82f6;
}

.calendar-day.today.available {
    background-color: rgba(34, 197, 94, 0.1);
    border: 2px solid #22c55e;
}

.day-number {
    font-size: 0.875rem;
    font-weight: 500;
}

.slot-indicator {
    font-size: 0.625rem;
    text-align: center;
    margin-top: 0.125rem;
    line-height: 1;
}

.slot-count {
    font-weight: 700;
    color: #059669;
    display: block;
}

.slot-text {
    color: #6b7280;
    display: block;
    font-size: 0.5rem;
    margin-top: 0.125rem;
}

/* Time slot styles */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.time-slot {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: white;
}

.time-slot:hover {
    border-color: var(--primary-color, #0284c7);
    background-color: rgba(2, 132, 199, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.time-slot.selected {
    background-color: var(--primary-color, #0284c7);
    border-color: var(--primary-color, #0284c7);
    color: white;
    font-weight: 600;
}

.time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9fafb;
}

.time-slot.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e5e7eb;
    background-color: #f9fafb;
}

/* Fixed Layout Styles */
.booking-layout {
    height: 100vh;
    overflow: hidden;
}

/* Desktop container with margins */
@media (min-width: 1200px) {
    .booking-flow-container {
        /* Removed max-width constraint to allow full-width usage in theme layouts */
        margin: 0 auto;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .booking-flow-container {
        /* Removed max-width constraint to allow full-width usage in theme layouts */
        margin: 0 auto;
    }
}

.booking-sidebar-wrapper {
    width: 400px;
    flex-shrink: 0;
    border-right: 1px solid #e5e7eb;
}

.booking-content-wrapper {
    flex-grow: 1;
    overflow: hidden;
}

.booking-content {
    height: 100%;
    overflow-y: auto;
}

/* Product List Styles */
.products-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-right: 8px;
}

.products-list::-webkit-scrollbar {
    width: 6px;
}

.products-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.products-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.products-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.product-row {
    transition: all 0.2s ease;
}

.product-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
}

.product-card:hover {
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.product-card.selected {
    border-color: #0284c7;
    background-color: rgba(2, 132, 199, 0.02);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.product-card.selected .selection-checkbox {
    background-color: #0284c7;
    border-color: #0284c7;
}

.product-card.selected .selection-text {
    background-color: #0284c7 !important;
    color: white !important;
}

.product-card.selected .selection-text i {
    display: none;
}

.product-card.selected .selection-text::before {
    content: "✓ ";
    font-weight: bold;
}

.selection-checkbox {
    transition: all 0.2s ease;
}

.selection-indicator .badge {
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.product-image {
    border: 1px solid #e5e7eb;
}

/* Product Variations Styles */
.product-variations {
    background-color: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 0.5rem;
}

.variation-item {
    background: white;
    border: 2px solid #e5e7eb !important;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variation-item:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.variation-item.selected {
    border-color: #0284c7 !important;
    background-color: #f0f9ff !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.variation-radio-input {
    width: 18px;
    height: 18px;
    accent-color: #0284c7;
}

.variation-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.variation-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

.variation-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0284c7;
}

.quantity-controls {
    gap: 0.5rem;
}

.quantity-controls .btn {
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    transition: all 0.2s ease;
}

.quantity-controls .btn:hover {
    border-color: #0284c7;
    color: #0284c7;
    background: #f0f9ff;
}

.quantity-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-display {
    font-weight: 600;
    color: #1f2937;
    min-width: 24px;
    text-align: center;
}

.variation-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-style: italic;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .product-card .card-body {
        padding: 1rem !important;
    }

    .product-card {
        margin-bottom: 1rem !important;
    }

    .variation-item {
        padding: 0.75rem !important;
        margin-bottom: 0.375rem !important;
    }

    .variation-name {
        font-size: 0.9rem !important;
    }

    .variation-description {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }

    .variation-price {
        font-size: 1rem !important;
    }

    .quantity-controls .btn {
        width: 24px !important;
        height: 24px !important;
    }

    /* Better variation item spacing on mobile */
    .variation-item {
        padding: 0.75rem !important;
    }

    .variation-item .quantity-controls {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #e5e7eb;
    }

    .quantity-input {
        width: 45px !important;
        font-size: 0.9rem;
    }

    /* Variation UI state transitions */
    .variation-required-message,
    .variation-selected-message,
    .select-product-message,
    .product-selected-message {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .variation-selected-message {
        color: #198754 !important;
        font-weight: 500;
    }

    .product-selected-message {
        background-color: #198754 !important;
        border-color: #198754 !important;
    }

    /* Step content transitions */
    .step-content-container {
        transition: opacity 0.3s ease;
    }

    .step-content-container[style*="display: none"] {
        opacity: 0;
    }

    .step-content-container:not([style*="display: none"]) {
        opacity: 1;
    }

    .product-variations {
        padding: 0.75rem !important;
        margin-top: 0.375rem !important;
    }

    /* Compact product header on mobile */
    .product-card h5 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
    }

    .product-card .h5 {
        font-size: 1.1rem !important;
    }

    /* Better spacing for mobile */
    .product-card .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    .product-card .mb-2 {
        margin-bottom: 0.5rem !important;
    }
}

/* Category filter improvements */
.category-filters {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.category-filter {
    border-radius: 2rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
}

.category-filter:hover {
    border-color: #0284c7;
    background-color: rgba(2, 132, 199, 0.05);
    color: #0284c7;
}

.category-filter.active {
    background-color: #0284c7;
    border-color: #0284c7;
    color: white;
}

/* Quantity controls */
.quantity-btn {
    transition: all 0.2s ease;
}

.quantity-btn:hover:not(:disabled) {
    background-color: #0284c7;
    border-color: #0284c7;
    color: white;
    transform: scale(1.05);
}

.quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Product variations */
.product-variations {
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.variation-select {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    transition: border-color 0.2s ease;
}

.variation-select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .booking-layout {
        flex-direction: column;
        height: auto;
    }

    .booking-sidebar-wrapper {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .booking-content {
        height: auto;
        overflow-y: visible;
    }

    .products-list {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
}

@media (max-width: 767.98px) {
    .product-card .row {
        flex-direction: column;
    }

    .product-card .col-auto:first-child {
        margin-bottom: 1rem;
        align-self: center;
    }

    .product-card .col-auto:last-child {
        align-self: center;
        margin-top: 1rem;
    }

    .product-image {
        width: 60px !important;
        height: 60px !important;
    }
}

/* Category filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.category-filter {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.category-filter:hover {
    border-color: var(--primary-color, #0284c7);
    background-color: rgba(2, 132, 199, 0.05);
}

.category-filter.active {
    background-color: var(--primary-color, #0284c7);
    border-color: var(--primary-color, #0284c7);
    color: white;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color, #0284c7);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
    background-color: #fff;
}

.form-control.is-valid {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.form-control.is-invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-check {
    margin-bottom: 1rem;
}

.form-check-input {
    margin-top: 0.25rem;
}

.form-check-label {
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

.form-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.invalid-feedback {
    display: none;
}

.invalid-feedback.d-block {
    display: block !important;
}

/* Form validation summary */
#form-validation-summary {
    border-left: 4px solid #ef4444;
}

#form-validation-summary .alert-heading {
    color: #dc2626;
    font-size: 1rem;
    font-weight: 600;
}

#validation-errors-list {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

#validation-errors-list li {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

/* Step navigation styles */
.step-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.step-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.step-item.completed .step-icon {
    background-color: #10b981;
    color: white;
}

.step-item.current .step-icon {
    background-color: var(--primary-color, #0284c7);
    color: white;
}

/* Desktop sticky navigation */
@media (min-width: 993px) {
    /* Make navigation sticky on desktop too for better UX */
    .booking-content .border-top {
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 90;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #e5e7eb !important;
        margin-top: 2rem !important;
    }
}

/* Mobile responsiveness */
@media (max-width: 992px) {
    /* Tablet adjustments */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .time-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile adjustments */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .calendar-day {
        min-height: 3.5rem;
        padding: 0.25rem;
        font-size: 0.875rem;
    }

    .calendar-day-header {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }

    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .category-filter {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Mobile form improvements */
    .form-control {
        padding: 0.875rem;
        font-size: 1rem; /* Prevent zoom on iOS */
    }

    .form-check-input {
        transform: scale(1.2);
        margin-right: 0.75rem;
    }

    /* Mobile calendar improvements */
    .calendar-container {
        margin: 0 -0.5rem;
    }

    .calendar-header {
        padding: 0.75rem;
    }

    .calendar-nav-btn {
        padding: 0.75rem;
        min-width: 44px; /* Touch target size */
        min-height: 44px;
    }

    /* Mobile time slots */
    .time-slot {
        padding: 1rem 0.75rem;
        min-height: 60px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    /* Mobile product cards */
    .product-card {
        padding: 1.25rem;
    }

    .product-card .card-img-top {
        height: 180px;
    }

    /* Mobile step navigation improvements */
    .step-item {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .step-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px;
    }

    /* Mobile booking summary */
    .booking-summary-mobile {
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 1rem;
        z-index: 100;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    }

    /* Mobile service header - compact and sticky */
    .service-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 200 !important;
        background: white !important;
        border-bottom: 1px solid #e5e7eb !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        margin-bottom: 0 !important;
        padding: 0.75rem 1rem !important;
    }

    .service-header h2 {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
    }

    .service-header p {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
        display: none; /* Hide description on mobile to save space */
    }

    .service-header .h5 {
        font-size: 1rem !important;
    }

    /* Collapsible booking summary toggle */
    .mobile-summary-toggle {
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
        color: white;
        border: none;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        font-weight: 600;
        font-size: 0.9rem;
        box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
        transition: all 0.2s ease;
    }

    .mobile-summary-toggle:hover {
        background: linear-gradient(135deg, #0369a1 0%, #1e40af 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
    }

    .mobile-summary-toggle .chevron {
        transition: transform 0.2s ease;
    }

    .mobile-summary-toggle.expanded .chevron {
        transform: rotate(180deg);
    }

    /* Mobile floating action buttons */
    .mobile-fab-container {
        position: fixed;
        top: 70%;
        right: 1rem;
        transform: translateY(-50%);
        z-index: 150;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .mobile-fab {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.2s ease;
        backdrop-filter: blur(10px);
    }

    .mobile-fab:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

    .mobile-fab.cancel {
        background: rgba(239, 68, 68, 0.9);
        color: white;
    }

    .mobile-fab.start-over {
        background: rgba(245, 158, 11, 0.9);
        color: white;
    }

    .mobile-fab.menu {
        background: rgba(107, 114, 128, 0.9);
        color: white;
    }

    /* Hide desktop sidebar on mobile */
    .booking-sidebar-wrapper {
        display: none !important;
    }

    /* Full width content on mobile */
    .booking-content-wrapper {
        width: 100% !important;
    }

    /* Mobile navigation footer - make it sticky */
    .booking-content .border-top,
    .mobile-nav-footer {
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 90;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
        margin-top: 2rem !important;
        padding: 1rem 1.5rem !important;
        border-top: 1px solid #e5e7eb !important;
    }

    /* Enhanced mobile navigation buttons */
    .mobile-nav-footer #next-btn,
    .mobile-nav-footer #previous-btn {
        padding: 0.875rem 1.5rem;
        font-weight: 600;
        border-radius: 0.5rem;
        transition: all 0.2s ease;
        min-height: 48px; /* Touch-friendly height */
    }

    .mobile-nav-footer #next-btn {
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
        border: none;
        box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
    }

    .mobile-nav-footer #next-btn:hover {
        background: linear-gradient(135deg, #0369a1 0%, #1e40af 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
    }

    .mobile-nav-footer #previous-btn {
        border-color: #6b7280;
        color: #6b7280;
    }

    .mobile-nav-footer #previous-btn:hover {
        background-color: #f3f4f6;
        border-color: #4b5563;
        color: #4b5563;
    }
}

/* Enhanced navigation buttons for all devices */
.booking-content .border-top #next-btn,
.booking-content .border-top #previous-btn {
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    min-height: 44px;
}

.booking-content .border-top #next-btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.booking-content .border-top #next-btn:hover {
    background: linear-gradient(135deg, #0369a1 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.booking-content .border-top #previous-btn {
    border-color: #6b7280;
    color: #6b7280;
    background: white;
}

.booking-content .border-top #previous-btn:hover {
    background-color: #f3f4f6;
    border-color: #4b5563;
    color: #4b5563;
    transform: translateY(-1px);
}

    /* Progressive disclosure - collapsible sections */
    .mobile-collapsible {
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
        overflow: hidden;
        background: white;
    }

    .mobile-collapsible-header {
        background: #f8fafc;
        padding: 1rem;
        border-bottom: 1px solid #e5e7eb;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: between;
        transition: background-color 0.2s ease;
    }

    .mobile-collapsible-header:hover {
        background: #f1f5f9;
    }

    .mobile-collapsible-header.active {
        background: #eff6ff;
        border-bottom-color: #0284c7;
    }

    .mobile-collapsible-content {
        padding: 1rem;
        display: none;
    }

    .mobile-collapsible-content.show {
        display: block;
        animation: slideDown 0.2s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Mobile step indicator - minimal */
    .mobile-step-indicator {
        position: sticky;
        top: 60px; /* Below service header */
        background: white;
        border-bottom: 1px solid #e5e7eb;
        padding: 0.5rem 1rem;
        z-index: 180;
        font-size: 0.8rem;
        color: #6b7280;
        text-align: center;
    }

    .mobile-step-indicator .progress {
        height: 3px;
        margin-top: 0.5rem;
        background: #f3f4f6;
    }

    .mobile-step-indicator .progress-bar {
        background: linear-gradient(90deg, #0284c7, #0369a1);
    }

    /* Toast notifications */
    .toast-container {
        z-index: 9999 !important;
    }

    .toast {
        min-width: 250px;
        max-width: 350px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-radius: 0.5rem;
    }

    .toast .toast-body {
        font-size: 0.9rem;
        font-weight: 500;
        padding: 0.75rem;
    }

    .toast .btn-close {
        font-size: 0.8rem;
    }

    /* Mobile toast adjustments */
    @media (max-width: 768px) {
        .toast-container {
            left: 1rem;
            right: 1rem;
            top: 1rem !important;
        }

        .toast {
            min-width: auto;
            width: 100%;
            max-width: none;
        }
    }

    /* Search and filter styles */
    #product-search {
        border-radius: 0.5rem;
        border: 1px solid #d1d5db;
        transition: all 0.2s ease;
    }

    #product-search:focus {
        border-color: #0284c7;
        box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
    }

    #filter-toggle-btn {
        border-radius: 0.5rem;
        transition: all 0.2s ease;
    }

    #filter-toggle-btn.active {
        background-color: #0284c7;
        border-color: #0284c7;
        color: white;
    }

    #category-filters-container {
        animation: slideDown 0.2s ease;
    }

    /* Mobile summary improvements */
    .mobile-summary-toggle {
        transition: all 0.2s ease;
        border: none;
        outline: none;
    }

    .mobile-summary-toggle:focus {
        box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
    }

    /* No results message */
    #no-results-message {
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Enhanced Mobile Menu/Drawer Styles */
    .mobile-menu-overlay {
        backdrop-filter: blur(4px);
        animation: fadeIn 0.2s ease;
    }

    .mobile-menu {
        animation: slideInRight 0.3s ease;
        border-radius: 1rem 0 0 1rem;
        overflow: hidden;
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }
        to {
            transform: translateX(0);
        }
    }

    .mobile-menu-header {
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
        box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
    }

    .mobile-menu-content {
        background: #fafafa;
    }

    .mobile-menu-content > div {
        background: white;
        margin-bottom: 1px;
    }

    .mobile-menu-content > div:last-child {
        margin-bottom: 0;
    }

    /* Step progress in mobile menu */
    .steps-progress .step-icon-mini {
        transition: all 0.2s ease;
    }

    .steps-progress .spinner-grow {
        animation: pulse 1.5s ease-in-out infinite;
    }

    @keyframes pulse {
        0% {
            opacity: 1;
        }
        50% {
            opacity: 0.5;
        }
        100% {
            opacity: 1;
        }
    }

    /* Product items in mobile menu */
    .mobile-menu-content .bg-light {
        border: 1px solid #e5e7eb;
        transition: all 0.2s ease;
    }

    .mobile-menu-content .bg-light:hover {
        border-color: #0284c7;
        box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
    }

    /* Mobile menu close button */
    .mobile-menu-close {
        transition: all 0.2s ease;
    }

    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.3) !important;
        transform: scale(1.1);
    }

    /* Enhanced Product Card Styles */
    .product-description .show-more-btn,
    .product-description .show-less-btn {
        border: none;
        background: none;
        color: #0284c7;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .product-description .show-more-btn:hover,
    .product-description .show-less-btn:hover {
        color: #0369a1;
        text-decoration: underline;
    }

    /* Enhanced Quantity Controls */
    .quantity-input-group {
        border: 1px solid #d1d5db;
        border-radius: 0.375rem;
        overflow: hidden;
        transition: all 0.2s ease;
    }

    .quantity-input-group:focus-within {
        border-color: #0284c7;
        box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
    }

    .quantity-input-group .quantity-btn {
        border: none;
        background: #f8fafc;
        color: #374151;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .quantity-input-group .quantity-btn:hover:not(:disabled) {
        background: #e2e8f0;
        color: #0284c7;
    }

    .quantity-input-group .quantity-btn:disabled {
        background: #f1f5f9;
        color: #9ca3af;
        cursor: not-allowed;
        opacity: 0.6;
    }

    .quantity-input-group .quantity-input {
        border: none;
        background: white;
        font-weight: 600;
        color: #374151;
    }

    .quantity-input-group .quantity-input:focus {
        outline: none;
        box-shadow: none;
    }

    .quantity-hint {
        color: #6b7280;
        font-size: 0.7rem;
        margin-top: 0.25rem;
        text-align: center;
    }

    /* Variation item enhancements */
    .variation-item {
        transition: all 0.2s ease;
        position: relative;
    }

    .variation-item:hover {
        border-color: #cbd5e1 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .variation-item.selected {
        border-color: #0284c7 !important;
        background-color: #f0f9ff !important;
        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
    }

    .variation-item.selected::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, #0284c7, #0369a1);
        border-radius: 0 0.25rem 0.25rem 0;
    }

    /* Product card improvements */
    .product-card {
        transition: all 0.3s ease;
        border: 1px solid #e5e7eb;
    }

    .product-card:hover {
        border-color: #0284c7;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }

    .product-card.has-selected-variation {
        border-color: #10b981;
        background-color: #f0fdf4;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
        margin: 0 -1rem;
        z-index: 10;
    }

@media (max-width: 576px) {
    /* Small mobile adjustments */
    .time-slots-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .calendar-grid {
        font-size: 0.75rem;
        gap: 0.5px;
    }

    .calendar-day {
        min-height: 3rem;
        padding: 0.125rem;
    }

    .day-number {
        font-size: 0.75rem;
    }

    .slot-indicator {
        font-size: 0.5rem;
    }

    .slot-count {
        font-size: 0.625rem;
    }

    .slot-text {
        font-size: 0.375rem;
    }

    /* Small mobile forms */
    .form-group {
        margin-bottom: 1.25rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    /* Small mobile product cards */
    .product-card .card-img-top {
        height: 160px;
    }

    /* Navigation buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    /* Additional mobile grid fixes */
    .products-grid {
        margin: 0 -0.25rem; /* Negative margin to use full width */
        width: calc(100% + 0.5rem); /* Compensate for negative margin */
        box-sizing: border-box;
    }

    /* Ensure container doesn't cause horizontal scroll */
    .booking-content,
    .container-fluid,
    .step-content {
        overflow-x: hidden;
        max-width: 100vw;
        box-sizing: border-box;
    }

    /* Force mobile 2-column layout to fit properly */
    .products-grid[data-mobile-columns="2"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.6rem !important;
        padding: 0 0.3rem;
    }

    /* Ensure product cards don't overflow on mobile */
    .product-grid-item {
        min-width: 0;
        overflow: hidden;
    }

    .product-grid-item .product-card {
        width: 100%;
        box-sizing: border-box;
        height: auto;
        min-height: 320px; /* Consistent minimum height */
        display: flex;
        flex-direction: column;
    }

    /* Ensure card body takes remaining space */
    .product-grid-item .card-body {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 0.6rem !important;
    }

    /* Button container at bottom */
    .product-grid-item .card-body .btn {
        margin-top: auto;
        width: 100%;
        min-height: 2rem;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch device specific styles */
    .calendar-day:hover {
        transform: none;
    }

    .time-slot:hover {
        transform: none;
        box-shadow: none;
    }

    .product-card:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .category-filter:hover {
        background-color: white;
        border-color: #d1d5db;
    }

    /* Larger touch targets */
    .calendar-day {
        min-height: 48px;
    }

    .time-slot {
        min-height: 48px;
    }

    .category-filter {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .calendar-day {
        min-height: 2.5rem;
    }

    .time-slots-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .calendar-day,
    .time-slot,
    .product-card {
        border-width: 0.5px;
    }
}

/* ===== ENHANCED GRID LAYOUT STYLES ===== */

/* Base grid layout improvements */
.products-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr; /* Mobile first - single column */
}

/* Grid product cards */
.product-grid-item .product-card {
    height: 320px; /* Fixed height for consistency */
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #ffffff !important; /* Force white background */
    display: flex;
    flex-direction: column;
}

.product-grid-item .product-card:hover {
    border-color: var(--booking-primary-color);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.15);
    transform: translateY(-4px);
}

/* Product image container */
.product-image-container {
    position: relative;
    overflow: hidden;
}

.product-image-container img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-grid-item .product-card:hover .product-image-container img {
    transform: scale(1.05);
}

/* Placeholder for missing images */
.product-image-container .card-img-top {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 3rem;
}

/* Product card body */
.product-grid-item .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem;
    background-color: #ffffff !important; /* Force white background */
}

.product-grid-item .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem; /* Reduced from 0.25rem to reduce gap */
    color: #212529;
}

.product-grid-item .card-text {
    flex-grow: 1;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #6c757d;
    margin-bottom: 0.75rem; /* Reduced from 1rem to reduce gap */
}

/* Price styling */
.product-grid-item .text-success {
    font-size: 1.1rem;
    font-weight: 700;
    color: #198754 !important;
    margin-top: auto;
}

/* Action buttons */
.product-grid-item .btn {
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    margin-top: 0.75rem;
}

.product-grid-item .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Variation badges */
.product-grid-item .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
}

/* Inline variations for grid */
.product-variations {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.variation-option {
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    cursor: pointer;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.variation-option:hover {
    background-color: #e9ecef;
    border-color: var(--booking-primary-color);
    transform: translateY(-1px);
}

.variation-option.selected {
    background-color: #e7f3ff;
    border-color: var(--booking-primary-color);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* Responsive grid columns */
@media (min-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .product-grid-item .card-title {
        font-size: 1.1rem;
    }

    .product-grid-item .card-text {
        font-size: 0.9rem;
    }
}

@media (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }
}

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .product-grid-item .card-title {
        font-size: 1.125rem;
    }
}

@media (min-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Grid layout mobile optimizations */
@media (max-width: 575px) {
    .products-grid {
        gap: 0.75rem !important; /* Smaller gap for mobile */
        padding: 0 0.5rem; /* Add horizontal padding to prevent cutoff */
    }

    /* Ensure mobile 2-column layout fits properly */
    .products-grid[style*="repeat(2, 1fr)"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
    }

    .product-image-container img,
    .product-image-container .card-img-top,
    .product-grid-item .card-img-top {
        height: 140px !important; /* Smaller images on mobile */
        object-fit: cover;
        width: 100%;
    }

    .product-grid-item .card-body {
        padding: 0.75rem; /* Reduced padding */
    }

    .product-grid-item .card-title {
        font-size: 0.8rem; /* Smaller title */
        margin-bottom: 0.25rem;
        line-height: 1.1;
        height: 2.2rem; /* Fixed height for consistency */
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .product-grid-item .card-text {
        font-size: 0.7rem; /* Smaller text */
        margin-bottom: 0.5rem;
        line-height: 1.2;
        height: 1.4rem; /* Fixed height */
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }

    .product-grid-item .text-success {
        font-size: 0.85rem; /* Smaller price */
        font-weight: 600;
    }

    .product-grid-item .btn {
        font-size: 0.7rem; /* Smaller button text */
        padding: 0.35rem 0.5rem; /* Smaller button padding */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Ensure cards don't overflow */
    .product-grid-item {
        min-width: 0; /* Allow shrinking */
        overflow: hidden;
    }

    .product-grid-item .product-card {
        height: auto; /* Allow flexible height on mobile */
        min-height: 280px; /* Minimum height for consistency */
    }
}

/* Grid search and filter adjustments */
.products-grid + #no-products-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
}

/* Animation for grid items */
.product-grid-item {
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.product-grid-item:nth-child(1) { animation-delay: 0.1s; }
.product-grid-item:nth-child(2) { animation-delay: 0.2s; }
.product-grid-item:nth-child(3) { animation-delay: 0.3s; }
.product-grid-item:nth-child(4) { animation-delay: 0.4s; }
.product-grid-item:nth-child(5) { animation-delay: 0.5s; }
.product-grid-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Override dark mode - force light theme for product cards */
@media (prefers-color-scheme: dark) {
    .product-grid-item .product-card {
        background-color: #ffffff !important; /* Force white background */
        border-color: #e9ecef !important;
        color: #212529 !important;
    }

    .product-grid-item .card-body {
        background-color: #ffffff !important; /* Force white background */
    }

    .product-grid-item .card-title {
        color: #212529 !important; /* Force dark text */
    }

    .product-grid-item .card-text {
        color: #6c757d !important; /* Force muted text */
    }

    .product-variations {
        background-color: #f8f9fa !important;
        border-color: #dee2e6 !important;
    }

    .variation-option {
        background-color: #ffffff !important;
        border-color: #dee2e6 !important;
        color: #212529 !important;
    }

    .variation-option:hover {
        background-color: #e9ecef !important;
    }
}

/* Additional overrides to ensure white backgrounds */
.product-card,
.product-card .card-body,
.card.product-card,
.card.product-card .card-body {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Ensure proper spacing between title and price */
.product-grid-item .mt-auto {
    margin-top: 0.5rem !important; /* Reduce spacing before price */
}

.product-grid-item .card-title + .card-text + .mt-auto {
    margin-top: 0.25rem !important; /* Even less spacing when there's description */
}

/* ===== SELECTED PRODUCT VISUAL INDICATORS ===== */

/* Selected product cards */
.product-grid-item.selected .product-card,
.product-card.selected {
    border-color: #28a745 !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25) !important;
    background-color: #f8fff9 !important;
}

.product-grid-item.selected .product-card:hover {
    border-color: #28a745 !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.35) !important;
    transform: translateY(-4px);
}

/* Selected badge */
.selected-badge {
    z-index: 10;
    pointer-events: none;
}

.selected-badge .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animation for selected state */
.product-grid-item.selected {
    animation: selectedPulse 0.6s ease-out;
}

@keyframes selectedPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Modal selected variation styling */
.variation-option-modal.selected {
    border-color: #28a745 !important;
    background-color: #f8fff9 !important;
}

.single-product-section.selected {
    border: 2px solid #28a745 !important;
    background-color: #f8fff9 !important;
}

/* Product card badge styling */
.product-grid-item .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* Badge container styling */
.product-grid-item .position-absolute.top-0.end-0 {
    z-index: 5;
}

/* Ensure badges don't overlap with content and consistent spacing */
.product-grid-item .card-body {
    padding: 0.75rem !important;
    padding-right: 1rem !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Compact button styling */
.product-grid-item .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Title height consistency */
.product-grid-item .card-title {
    min-height: 2.6rem;
    max-height: 2.6rem;
}

/* Description height consistency */
.product-grid-item .card-text {
    min-height: 1.3rem;
    max-height: 1.3rem;
}

/* Product image container fixed height */
.product-grid-item .product-image-container {
    height: 160px;
    flex-shrink: 0;
}
