/* Namespace: tw- */
.tw-widget-container {
    display: grid;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif, system-ui;
}

/* Grid Layouts */
.tw-grid-1 { grid-template-columns: 1fr; }
.tw-grid-2 { grid-template-columns: repeat(2, 1fr); }
.tw-grid-3 { grid-template-columns: repeat(3, 1fr); }
.tw-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .tw-grid-2, .tw-grid-3, .tw-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tw-grid-1, .tw-grid-2, .tw-grid-3, .tw-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.tw-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #f0f0f0;
}

.tw-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Horizontal layout for 1-2 grid */
.tw-grid-1 .tw-card, .tw-grid-2 .tw-card {
    flex-direction: row;
}

@media (max-width: 768px) {
    .tw-grid-1 .tw-card, .tw-grid-2 .tw-card {
        flex-direction: column;
    }
}

/* Image section */
.tw-image-wrapper {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.tw-grid-1 .tw-image-wrapper, .tw-grid-2 .tw-image-wrapper {
    width: 300px;
    height: 300px;
}

.tw-grid-3 .tw-image-wrapper, .tw-grid-4 .tw-image-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
}

@media (max-width: 768px) {
    .tw-grid-1 .tw-image-wrapper, .tw-grid-2 .tw-image-wrapper {
        width: 100%;
        aspect-ratio: 16/9;
    }
}

.tw-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badges */
.tw-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.tw-badge {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Content */
.tw-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tw-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #111827;
    line-height: 1.4;
}

/* Prices */
.tw-price-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.tw-price-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 8px;
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    color: #4b5563;
}

.tw-price-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.tw-price-display {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.tw-price-value {
    font-size: 22px;
    font-weight: 800;
    color: #2563eb;
}

.tw-price-label {
    font-size: 13px;
    color: #6b7280;
}

.tw-cta-btn {
    margin-top: 16px;
    display: block;
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.2s;
}

.tw-cta-btn:hover {
    background: #1d4ed8;
}

/* Hide extra prices by default */
.tw-price-amount {
    display: none;
}
.tw-price-amount.active {
    display: inline;
}
