/**
 * Salon Services Widget Styles
 * Version: 2.1.0
 */

/* ==============================================
   CONTAINER & WRAPPER
   ============================================== */
.ss-wrapper {
    margin: 0 auto;
    position: relative;
    padding-bottom: 60px;
    width: 100%;
}

.ss-wrapper * {
    box-sizing: border-box;
}

/* ==============================================
   FILTER BAR
   ============================================== */
.ss-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.ss-filter-label {
    font-size: 20px;
    font-weight: 700;
    color: #990000;
    margin: 0 15px 0 0;
}

.ss-filter-btn {
    background: #f1f1f1;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #444;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.ss-filter-btn:hover,
.ss-filter-btn.active {
    background: #990000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(153, 0, 0, 0.3);
}

.ss-filter-btn:focus {
    outline: 2px solid #990000;
    outline-offset: 2px;
}


/* ==============================================
   SEARCH BAR
   ============================================== */
.ss-search-wrap {
    position: relative;
    margin-bottom: 24px;
}

/* Slider widget: constrain search bar to 70% on desktop */
.ss-wrapper .ss-search-wrap {
    width: 70%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 767px) {
    .ss-wrapper .ss-search-wrap {
        width: 100%;
    }
}

.ss-search-bar {
    width: 100%;
    padding: 14px 48px 14px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    font-size: 14px;
    color: #444;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.ss-search-bar:focus {
    border-color: #990000;
}

.ss-search-bar::placeholder {
    color: #aaa;
}

.ss-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #aaa;
    display: flex;
    align-items: center;
}

.ss-search-icon svg {
    width: 18px;
    height: 18px;
}

/* Search results grid (slider widget) */
.ss-search-results {
    margin-top: 10px;
}

/* ==============================================
   CATEGORY CAROUSEL (Global Search widget)
   ============================================== */
.ss-global-wrapper {
    width: 100%;
}

.ss-cat-carousel-wrap {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ss-cat-carousel {
    flex: 1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ss-cat-carousel::-webkit-scrollbar {
    display: none;
}

/* Carousel chevrons — !important guards against theme button resets */
.ss-carousel-chevron {
    flex-shrink: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 6px !important;
    cursor: pointer;
    color: #999 !important;
    border-radius: 2px;
    transition: color 0.2s ease, background-color 0.2s ease;
    line-height: 1;
    outline: none;
}

.ss-carousel-chevron:hover {
    color: #333 !important;
    background-color: #f1f1f1 !important;
}

.ss-carousel-chevron svg {
    display: block;
    width: 20px;
    height: 20px;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2;
    color: inherit;
}

.ss-carousel-chevron.ss-chevron-disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.ss-cat-carousel-btn {
    scroll-snap-align: start;
    flex-shrink: 0;
    background: #f1f1f1;
    border: none;
    padding: 10px 22px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #444;
    transition: background 0.2s ease, color 0.2s ease;
    border-radius: 2px;
    white-space: nowrap;
}

.ss-cat-carousel-btn:hover,
.ss-cat-carousel-btn.active {
    background: #990000;
    color: #fff;
}

.ss-cat-carousel-btn:focus {
    outline: 2px solid #990000;
    outline-offset: 2px;
}

/* No results message */
.ss-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    width: 100%;
}

/* ==============================================
   SESSION SELECTOR STYLES
   ============================================== */
.ss-session-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    display: block;
    text-align: left;
}

.ss-session-btn {
    display: block !important;
    width: 100% !important;
    margin-bottom: 10px !important;
    text-align: center;
}

.ss-session-btn:last-of-type {
    margin-bottom: 0 !important;
}

/* ==============================================
   CARD IMAGE - HIGH QUALITY
   ============================================== */
.ss-image {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.ss-card-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Heights */
.ss-card.layout-horizontal .ss-image {
    min-height: 320px;
    height: 320px;
}

.ss-card.layout-vertical .ss-image {
    height: 250px;
    width: 100%;
}

@media (max-width: 768px) {
    .ss-card.layout-horizontal .ss-image,
    .ss-card.layout-vertical .ss-image {
        height: 200px;
        min-height: 200px;
    }
}

/* ==============================================
   SWIPER SLIDER - DYNAMIC HEIGHT
   ============================================== */
.ss-swiper {
    width: 100%;
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
    align-items: flex-start; /* Changed from stretch */
}

.ss-category-slide {
    height: auto !important; /* Allow auto height */
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* ==============================================
   SERVICE GRID - EQUAL HEIGHT CARDS
   ============================================== */
.ss-service-grid {
    --ss-columns: 2; /* Default 2 columns */
    --ss-gap: 30px; /* Default gap */
    display: grid !important;
    grid-template-columns: repeat(var(--ss-columns), 1fr);
    gap: var(--ss-gap);
    width: 100%;
    min-height: auto;
    align-items: stretch !important; /* All cards same height per row */
}

/* When fewer items than columns, center them */
.ss-service-grid {
    justify-content: center;
}

/* Card styling within grid - CRITICAL for alignment */
.ss-service-grid > .ss-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important; /* Fill grid cell height */
}

/* Single column - center and limit width */
.ss-service-grid[style*="--ss-columns: 1"],
.ss-service-grid[style*="--ss-columns:1"] {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==============================================
   CATEGORY TITLE
   ============================================== */
.ss-category-title {
    font-size: 32px;
    font-weight: 700;
    color: #990000;
    margin: 0 0 30px 0;
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .ss-category-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
}

.ss-custom-desc {
    margin: -10px 0 24px;
    text-align: center;
    color: #555;
    line-height: 1.6;
}

.ss-custom-desc p { margin: 0 0 10px; }
.ss-custom-desc p:last-child { margin-bottom: 0; }


/* Grid gap is controlled by Elementor responsive controls */

/* ==============================================
   SERVICE CARD
   ============================================== */
.ss-card {
    display: flex !important;
    flex-direction: column !important;
    background: #fff;
    border: 1px solid #eee;
    width: 100%;
    min-height: 320px;
    height: 100% !important; /* Fill grid cell */
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Hover Effects - Controlled by Elementor */
.ss-card.hover-lift:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.ss-card.hover-grow:hover {
    transform: scale(1.05);
}

.ss-card.hover-shrink:hover {
    transform: scale(0.95);
}

.ss-card.hover-shadow:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.ss-card.hover-pulse:hover {
    animation: pulse 0.6s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.ss-card.hover-none:hover {
    /* No hover effect */
}

/* Horizontal Layout (Image Left) */
.ss-card.layout-horizontal {
    flex-direction: row;
}

.ss-card.layout-horizontal .ss-image {
    width: 45%; /* Default, overridden by Elementor */
    flex-shrink: 0;
}

.ss-card.layout-horizontal .ss-content {
    width: 55%; /* Default, overridden by Elementor */
}

/* Vertical Layout (Image Top) */
.ss-card.layout-vertical {
    flex-direction: column;
}

.ss-card.layout-vertical .ss-image {
    width: 100%;
    height: 250px;
    flex-shrink: 0;
}

.ss-card.layout-vertical .ss-content {
    width: 100%;
}

/* ==============================================
   NO IMAGE LAYOUT
   ============================================== */
.ss-card.layout-no-image {
    flex-direction: column !important;
    min-height: auto;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    height: 100% !important;
}

.ss-card.layout-no-image .ss-content {
    width: 100%;
    padding: 30px;
    text-align: left;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

.ss-card.layout-no-image .ss-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #8b6f5c;
    flex-shrink: 0;
}

.ss-card.layout-no-image .ss-meta {
    margin-bottom: 15px;
    flex-shrink: 0;
}

.ss-card.layout-no-image .ss-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
    flex-shrink: 0;
    /* min-height set by JavaScript */
}

.ss-card.layout-no-image .ss-session-label {
    font-size: 13px;
    font-weight: 600;
    font-style: italic;
    color: #666;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.ss-card.layout-no-image .ss-btn-container {
    flex-shrink: 0 !important;
    /* min-height set by JavaScript */
}

.ss-card.layout-no-image .ss-book-btn,
.ss-card.layout-no-image .ss-session-btn {
    background: transparent;
    border: 1px solid #ccc;
    color: #555;
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.ss-card.layout-no-image .ss-book-btn:hover,
.ss-card.layout-no-image .ss-session-btn:hover {
    background: #f0f0f0;
    border-color: #999;
    transform: none;
    box-shadow: none;
}

.ss-card.layout-no-image .ss-book-btn i,
.ss-card.layout-no-image .ss-session-btn i {
    font-size: 14px;
    color: #888;
}

/* ==============================================
   CARD IMAGE - HIGH QUALITY
   ============================================== */
.ss-image {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.ss-card-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Force hardware acceleration for sharp rendering */
.ss-card-image {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Heights */
.ss-card.layout-horizontal .ss-image {
    min-height: 320px;
    height: 320px;
}

.ss-card.layout-vertical .ss-image {
    height: 250px;
    width: 100%;
}
/* ==============================================
   CARD CONTENT
   ============================================== */
.ss-content {
    padding: 30px;
    display: flex !important;
    flex-direction: column !important;
    text-align: left;
    flex: 1 1 auto !important;
}

.ss-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
    flex-shrink: 0;
}

.ss-meta {
    font-size: 13px;
    margin-bottom: 15px;
    font-weight: 600;
    font-style: italic;
    opacity: 0.8;
    color: #666;
    flex-shrink: 0;
}

.ss-meta .ss-separator {
    margin: 0 5px;
}

.ss-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #555;
    flex-shrink: 0;
    /* min-height set by JavaScript to align labels */
}

/* ==============================================
   BUTTONS - LABELS ALIGNED BY JAVASCRIPT
   ============================================== */

.ss-btn-container {
    width: 100%;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
    flex-shrink: 0 !important;
    /* min-height set by JavaScript to align across cards */
}

/* Session label before buttons */
.ss-session-label {
    font-size: 13px;
    font-weight: 600;
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.ss-book-btn,
.ss-book-btn-2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 2px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    gap: 8px;
    box-sizing: border-box;
}

/* Button Icons */
.ss-btn-icon-before,
.ss-btn-icon-after,
.ss-book-btn i,
.ss-book-btn-2 i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
}

/* Font Awesome Icons */
.ss-book-btn i.ss-btn-icon-before,
.ss-book-btn-2 i.ss-btn-icon-before {
    margin-right: 10px;
}

.ss-book-btn i.ss-btn-icon-after,
.ss-book-btn-2 i.ss-btn-icon-after {
    margin-left: 10px;
}

/* Elementor SVG Icons */
.ss-btn-icon-before svg,
.ss-btn-icon-after svg {
    display: block;
    width: 1em;
    height: 1em;
}

.ss-btn-icon-before {
    margin-right: 8px;
}

.ss-btn-icon-after {
    margin-left: 8px;
}

.ss-book-btn {
    background: #990000;
    color: #fff;
}

.ss-book-btn-2 {
    background: #f1f1f1;
    color: #444;
}

.ss-book-btn:hover,
.ss-book-btn-2:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ss-book-btn:focus,
.ss-book-btn-2:focus {
    outline: 2px solid #990000;
    outline-offset: 2px;
}
/* ==============================================
   NO POSTS MESSAGE
   ============================================== */
.ss-no-posts {
    grid-column: 1 / -1; /* Span all columns */
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 4px;
    width: 100%;
}

.ss-no-posts p {
    font-size: 16px;
    color: #666;
    margin: 0 0 10px 0;
}

.ss-no-posts small {
    font-size: 13px;
    color: #999;
    font-style: italic;
}

/* ==============================================
   SWIPER PAGINATION
   ============================================== */
.ss-wrapper .ss-pagination-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.ss-wrapper {
    position: relative;
}

.ss-wrapper > .ss-nav-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    color: #E8E1E1;
    background-color: transparent;
    transition: color 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.ss-wrapper > .ss-nav-prev {
    left: -40px;
}

.ss-wrapper > .ss-nav-next {
    right: -40px;
}

.ss-wrapper > .ss-nav-btn svg {
    display: block;
    width: 48px;
    height: 48px;
}

.ss-wrapper > .ss-nav-btn:hover {
    color: #5B5B5B;
    background-color: #dbd3cf;
}

.ss-wrapper .swiper-pagination {
    position: static !important;
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: auto;
    margin-top: 0 !important;
    display: flex;
    align-items: center;
}

.ss-wrapper .swiper-pagination-bullet {
    display: inline-block;
    vertical-align: middle;
    width: 12px;
    height: 12px;
    background: #ddd;
    opacity: 1;
    transition: all 0.3s ease;
}

.ss-wrapper .swiper-pagination-bullet-active {
    background: #990000;
    transform: scale(1.2);
}

/* ==============================================
   RESPONSIVE - TABLET
   ============================================== */
@media (max-width: 1024px) {
    .ss-service-grid {
        gap: 25px;
    }

    .ss-content {
        padding: 25px;
    }

    .ss-content h3 {
        font-size: 18px;
    }

    .ss-desc {
        font-size: 13px;
    }
}

/* ==============================================
   RESPONSIVE - MOBILE
   ============================================== */
@media (max-width: 768px) {
    /* Stack filters vertically */
    .ss-filters {
        flex-direction: column;
        gap: 8px;
    }

    .ss-filter-label {
        margin: 0 0 5px 0;
        text-align: center;
    }

    .ss-filter-btn {
        width: 100%;
        max-width: 300px;
    }

    /* Single column grid on mobile */
    .ss-service-grid {
        --ss-columns: 1 !important;
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Force vertical layout on mobile */
    .ss-card,
    .ss-card.layout-horizontal {
        flex-direction: column;
        min-height: auto;
    }

    .ss-image,
    .ss-card.layout-horizontal .ss-image {
        width: 100% !important;
        height: 250px;
        min-height: 250px;
    }

    .ss-content,
    .ss-card.layout-horizontal .ss-content {
        width: 100% !important;
        padding: 20px;
    }

    .ss-content h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .ss-meta {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .ss-desc {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .ss-book-btn,
    .ss-book-btn-2 {
        padding: 10px 16px;
        font-size: 11px;
    }
    
    /* No-image layout mobile */
    .ss-card.layout-no-image .ss-content {
        padding: 20px;
    }
    
    .ss-card.layout-no-image .ss-content h3 {
        font-size: 18px;
    }
}

/* ==============================================
   RESPONSIVE - SMALL MOBILE
   ============================================== */
@media (max-width: 480px) {
    .ss-wrapper {
        padding-bottom: 40px;
    }

    .ss-filters {
        margin-bottom: 20px;
    }

    .ss-filter-label {
        font-size: 18px;
    }

    .ss-filter-btn {
        font-size: 12px;
        padding: 8px 16px;
    }

    .ss-image {
        height: 200px;
        min-height: 200px;
    }

    .ss-content {
        padding: 16px;
    }

    .ss-content h3 {
        font-size: 16px;
    }
}

/* ==============================================
   ACCESSIBILITY
   ============================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.ss-filter-btn:focus-visible,
.ss-book-btn:focus-visible,
.ss-book-btn-2:focus-visible {
    outline: 3px solid #990000;
    outline-offset: 3px;
}

/* ==============================================
   SHOW MORE BUTTON
   ============================================== */
.ss-show-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.ss-show-more-btn {
    background: transparent;
    border: 2px solid #990000;
    color: #990000;
    padding: 10px 32px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 2px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ss-show-more-btn:hover {
    background-color: #990000;
    color: #ffffff;
}

/* ==============================================
   PRINT STYLES
   ============================================== */
@media print {
    .ss-filters,
    .ss-pagination-nav {
        display: none;
    }

    .ss-service-grid {
        display: block;
    }

    .ss-card {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* ==============================================
   ELEMENTOR EDITOR STYLES
   ============================================== */
.elementor-editor-active .ss-wrapper {
    min-height: 300px;
}

.elementor-alert {
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid;
    background: #f9f9f9;
}

.elementor-alert-warning {
    border-color: #f0ad4e;
    color: #856404;
}

.elementor-alert-info {
    border-color: #5bc0de;
    color: #31708f;
}