/* ==========================================================================
   SpeedServices - Box / Price Box Widget Styles & CSS Animations
   ========================================================================== */

.ss-boxes-wrapper {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.ss-boxes-grid {
    display: grid;
    grid-template-columns: repeat(var(--ss-grid-cols-desktop, 3), 1fr);
    gap: var(--ss-grid-gap, 24px);
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .ss-boxes-grid {
        grid-template-columns: repeat(var(--ss-grid-cols-tablet, 2), 1fr);
    }
}

@media (max-width: 640px) {
    .ss-boxes-grid {
        grid-template-columns: repeat(var(--ss-grid-cols-mobile, 1), 1fr);
    }
}

/* ==========================================================================
   Single Card Box Base
   ========================================================================== */

.ss-box-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 28px 24px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1;
}

.ss-box-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   CSS Animated Border Effects
   ========================================================================== */

/* 1. Animated Gradient Glow */
.ss-box-card.ss-anim-glow {
    border-color: transparent;
}
.ss-box-card.ss-anim-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(90deg, #ff007f, #7928ca, #0070f3, #ff007f);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ssGlowRotate 4s linear infinite;
    pointer-events: none;
    z-index: 2;
}

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

/* 2. Pulse Glow */
.ss-box-card.ss-anim-pulse {
    animation: ssPulseGlow 2.5s infinite ease-in-out;
}

@keyframes ssPulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4);
        border-color: #0ea5e9;
    }
    70% {
        box-shadow: 0 0 0 12px rgba(14, 165, 233, 0);
        border-color: #38bdf8;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
        border-color: #0ea5e9;
    }
}

/* 3. Glassmorphism Modern */
.ss-box-card.ss-anim-glass {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}
.ss-box-card.ss-anim-glass:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #0ea5e9;
}

/* 4. Hover Stroke Dash Accent */
.ss-box-card.ss-anim-stroke {
    border-style: dashed;
    border-color: #cbd5e1;
}
.ss-box-card.ss-anim-stroke:hover {
    border-style: solid;
    border-color: #0284c7;
}

/* ==========================================================================
   Badge / Insignia Highlight
   ========================================================================== */

.ss-box-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    z-index: 3;
}

/* ==========================================================================
   Section Subtitles (Medidas, Peso, Ejemplos, Precio)
   ========================================================================== */

.ss-box-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    margin-bottom: 5px;
    display: block;
    width: 100%;
    text-align: center;
}

.ss-box-block-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}

/* ==========================================================================
   1. Media Section (Image / SVG Icon)
   ========================================================================== */

.ss-box-media-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    width: 90px;
    height: 90px;
    transition: transform 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-sizing: border-box;
}

.ss-box-card:hover .ss-box-media-wrapper {
    transform: scale(1.06);
}

/* Media Frame Contours */
.ss-box-media-wrapper.ss-shape-circle {
    border-radius: 50%;
    overflow: hidden;
}

.ss-box-media-wrapper.ss-shape-rounded {
    border-radius: 16px;
    overflow: hidden;
}

.ss-box-media-wrapper.ss-shape-square {
    border-radius: 4px;
    overflow: hidden;
}

.ss-box-media-wrapper.ss-shape-hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.ss-box-media-wrapper.ss-shape-octagon {
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

/* Media Image & SVG */
.ss-box-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.ss-box-media-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #0284c7;
    background-color: #f0f9ff;
    border-radius: inherit;
}

.ss-box-media-icon svg {
    width: 60%;
    height: 60%;
    fill: currentColor;
}

.ss-box-media-icon i {
    font-size: 42px;
    color: currentColor;
}

/* Default Box SVG Graphic fallback */
.ss-box-default-svg {
    width: 64px;
    height: 64px;
    color: #0284c7;
}

/* ==========================================================================
   2. Title Field
   ========================================================================== */

.ss-box-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px 0;
    line-height: 1.3;
}

/* ==========================================================================
   3. Dimensions Field
   ========================================================================== */

.ss-box-dimensions {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
}

.ss-box-dim-in {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ss-box-dim-cm {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

/* ==========================================================================
   4. Max Weight Field
   ========================================================================== */

.ss-box-weight-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #e0f2fe;
    color: #0369a1;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    box-sizing: border-box;
}

.ss-box-weight-icon {
    display: inline-flex;
    align-items: center;
    color: inherit;
}

/* ==========================================================================
   5. Description Field (Item Examples)
   ========================================================================== */

.ss-box-description {
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
    width: 100%;
}

/* ==========================================================================
   6. Price Field
   ========================================================================== */

.ss-box-price-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 20px;
    color: #0f172a;
}

.ss-box-price-symbol {
    font-size: 20px;
    font-weight: 700;
    color: #0284c7;
}

.ss-box-price-val {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0284c7;
}

.ss-box-price-unit {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 4px;
}

/* ==========================================================================
   7. Action Button
   ========================================================================== */

.ss-box-action-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #0284c7;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    box-sizing: border-box;
    margin-top: auto;
}

.ss-box-action-btn span {
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.ss-box-action-btn svg {
    color: inherit;
}

.ss-box-action-btn:hover {
    background-color: #0369a1;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.38);
    transform: translateY(-2px);
}
