/**
 * Merch Builder Frontend Styles
 * Styles for the Top Picks template
 */

/* Container */
.merch-builder-container {
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .merch-builder-container {
        padding: 1rem 0rem 2rem 0rem;
    }
}

.merch-builder-wrapper {
    max-width: 1280px;
    margin: 0 auto;
}

/* Title */
.merch-builder-title {
    font-size: 1.6470588235294rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem !important;
}

@media (min-width: 768px) {
    .merch-builder-title {
        font-size: 1.6470588235294rem;
        margin-bottom: 1rem !important;
    }
}

/* Advertisement Label */
.merch-builder-ad-label {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.merch-builder-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    font-size: 0.75rem;
}

/* Grid */
.merch-builder-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Mobile: Horizontal Scrolling */
@media (max-width: 767px) {
    .merch-builder-grid {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        padding-bottom: 1rem; /* Space for scrollbar */
        margin: 0 -1rem; /* Extend to edges */
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hide scrollbar but keep functionality */
    .merch-builder-grid::-webkit-scrollbar {
        height: 8px;
    }
    
    .merch-builder-grid::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    .merch-builder-grid::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
    }
    
    .merch-builder-grid::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

    .merch-builder-title {
        margin-left: -1rem !important;
    }
}

/* Tablet and Desktop: Grid Layout */
@media (min-width: 768px) {
    .merch-builder-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Card */
.merch-builder-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.merch-builder-card:hover {
    transform: scale(1.015);
}

/* Mobile: Fixed card width for horizontal scrolling */
@media (max-width: 767px) {
    .merch-builder-card {
        min-width: 310px;
        max-width: 316px;
        flex-shrink: 0;
        scroll-snap-align: start; /* Snap to card edges */
    }
}

/* Card Header */
.merch-builder-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.merch-builder-rank {
    width: 2.5rem;
    height: 2.5rem;
    background-color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.merch-builder-product-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
    margin: 0;
}

/* Logo */
.merch-builder-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4rem;
    margin-bottom: 1rem;
}

.merch-builder-logo {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.merch-builder-logo-text {
    font-size: 2.25rem;
    font-weight: bold;
}

/* CTA Button */
.merch-builder-cta {
    width: 100%;
    background-color: #FF4D37;
    color: white;
    font-weight: 600;
    padding: .5rem .5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s;
    margin-bottom: 0.25rem;
}

.merch-builder-cta:hover {
    background-color: #e41b00;
    color: white;
}

.merch-builder-arrow {
    font-size: 1.25rem;
}

/* Website Label */
.merch-builder-website-label {
    text-align: center;
    color: #6b7280;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

/* Divider */
.merch-builder-divider {
    border-top: 1px solid #e5e7eb;
    margin: 1rem 0;
}

/* Feature Row */
.merch-builder-feature-row {
    display: flex;
    justify-content: space-between;
    align-items: anchor-center;
    gap: 1rem;
}

.merch-builder-feature-label {
    color: #6b7280;
    font-size: 0.875rem;
}

.merch-builder-feature-value {
    color: #111827;
    font-weight: 500;
    text-align: right;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Error Messages */
.merch-builder-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .merch-builder-product-name {
        font-size: 1.25rem;
    }
    
    .merch-builder-logo-text {
        font-size: 1.875rem;
    }
}