/* =============================================
   Envirapack — components.css
   Dropdowns, bokningsmodal, produktkort, trust bar
   ============================================= */

/* --- Dropdown popups --- */
.dropdown-wrap {
    position: relative;
}
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 20px;
    min-width: 280px;
    z-index: 300;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}
.dropdown.open {
    display: block;
}
.dropdown h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}
.dropdown p {
    color: var(--text-light);
    margin-bottom: 8px;
}
.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}
.dropdown-link {
    display: block;
    padding: 8px 0;
    color: var(--primary);
    font-weight: 500;
    transition: color 0.2s;
}
.dropdown-link:hover {
    color: var(--accent);
}
.dropdown-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 8px;
    outline: none;
}
.dropdown-input:focus {
    border-color: var(--primary);
}
.dropdown-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.dropdown-btn:hover {
    background: var(--primary-dark);
}

/* --- Produktkort (används på hem + produktsida) --- */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}
.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.product-image {
    aspect-ratio: 1;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-info {
    padding: 16px;
}
.product-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}
.product-info p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}
.product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}
.product-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-light);
    margin-bottom: 4px;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* --- Trust bar --- */
.trust-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}
.trust-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    overflow-x: auto;
}
.trust-label {
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
    flex-shrink: 0;
}
.trust-logos {
    display: flex;
    align-items: center;
    gap: 32px;
}
.trust-logos span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    opacity: 0.5;
    white-space: nowrap;
}
.trust-logos img {
    height: 28px;
    width: auto;
    opacity: 0.4;
    transition: opacity 0.3s;
}
.trust-logos img:hover {
    opacity: 1;
}

/* --- Bokningsmodal --- */
.booking-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.booking-overlay.open {
    display: flex;
}
.booking-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.booking-close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--text-light);
    padding: 4px;
    z-index: 1;
}
.booking-close:hover {
    color: var(--text);
}
.booking-header {
    background: var(--primary);
    padding: 28px 28px 24px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.booking-header h3 {
    color: var(--text-on-dark);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}
.booking-header p {
    color: var(--text-on-dark-muted);
    font-size: 14px;
}
.booking-body {
    display: flex;
    gap: 24px;
    padding: 24px 28px;
}
.booking-calendar {
    flex: 1;
    min-width: 0;
}
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.cal-month {
    font-weight: 600;
    font-size: 15px;
}
.cal-prev,
.cal-next {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text);
    transition: background 0.2s;
}
.cal-prev:hover,
.cal-next:hover {
    background: var(--bg-alt);
}
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.cal-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    color: var(--text);
}
.cal-day:hover:not(.cal-day-disabled):not(.cal-day-empty) {
    background: var(--bg-alt);
}
.cal-day.cal-day-selected {
    background: var(--primary);
    color: #fff;
}
.cal-day.cal-day-disabled {
    color: var(--border);
    cursor: default;
}
.cal-day.cal-day-empty {
    cursor: default;
}
.cal-day.cal-day-today {
    font-weight: 600;
    border: 1.5px solid var(--primary);
}
.booking-times {
    width: 180px;
    flex-shrink: 0;
}
.times-hint {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    padding-top: 40px;
}
.times-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
}
.time-slot {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: none;
    color: var(--text);
}
.time-slot:hover:not(.time-slot-booked) {
    border-color: var(--primary);
    color: var(--primary);
}
.time-slot.time-slot-selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.time-slot-booked {
    background: var(--bg-alt);
    color: var(--text-light);
    cursor: default;
    text-decoration: line-through;
    opacity: 0.5;
}
.booking-footer {
    padding: 0 28px 28px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin: 0 28px;
}
.booking-summary {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    text-align: center;
}

/* =============================================
   Responsiv — components
   ============================================= */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .trust-logos {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-info h3 {
        font-size: 14.5px;
    }
}

@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}