/* Core styles shared across all templates */
/* Only essential resets and base styles go here */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ensure container takes up space */
.container {
    flex: 1;
    width: 100%;
}

/* Basic button reset */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Basic input reset */
input {
    font-family: inherit;
    border: none;
    outline: none;
}

/* Link reset */
a {
    text-decoration: none;
    color: inherit;
}

/* Image defaults */
img {
    max-width: 100%;
    height: auto;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== PRODUCT LIKE BUTTON ===== */

/* Like button positioned on product image */
.product-like-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.product-like-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-like-btn:active {
    transform: scale(0.95);
}

/* Like icon */
.product-like-btn .like-icon {
    width: 20px;
    height: 20px;
    stroke: #666;
    transition: all 0.3s ease;
}

.product-like-btn:hover .like-icon {
    stroke: #ff6b6b;
}

/* Liked state - filled heart */
.product-like-btn.liked {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.product-like-btn.liked .like-icon {
    fill: white;
    stroke: white;
    animation: likePopAnimation 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Like button animation */
@keyframes likePopAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* Ensure button appears on top of image container */
.product-image-container,
.card-image-container {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-like-btn {
        width: 36px;
        height: 36px;
        top: 8px;
        right: 8px;
    }

    .product-like-btn .like-icon {
        width: 18px;
        height: 18px;
    }
}

/* ===== PERSONALIZED RECOMMENDATIONS ===== */

.personalized-recommendations {
    margin-top: 40px;
    padding-top: 20px;
}

/* Results Separator (between personalized and general results) */
.results-separator {
    grid-column: 1 / -1; /* Span all columns */
    margin: 50px 0 40px;
    width: 100%;
}

.results-separator .separator-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 18px 40px;
    background: linear-gradient(to right, #f8f9fa, #ffffff, #f8f9fa);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-size: 15px;
    font-weight: 600;
    color: #5a6c7d;
    text-align: center;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.results-separator .separator-bar:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.results-separator .separator-icon {
    width: 22px;
    height: 22px;
    color: #8898aa;
    opacity: 0.8;
}

/* Personalized results header (golden) */
.results-separator.personalized {
    margin: 0 0 40px 0;
}

.results-separator.personalized .separator-bar {
    background: linear-gradient(135deg, #ffd859 0%, #ffb340 50%, #ff9a3c 100%);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    border: none;
    color: #2c3e50;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    box-shadow:
        0 3px 10px rgba(255, 165, 0, 0.2),
        0 1px 4px rgba(255, 140, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    padding: 14px 40px;
}

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

.results-separator.personalized .separator-bar:hover {
    box-shadow:
        0 4px 14px rgba(255, 165, 0, 0.28),
        0 2px 6px rgba(255, 140, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.results-separator.personalized .separator-icon {
    color: #2c3e50;
    opacity: 0.9;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.3));
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .results-separator .separator-bar {
        font-size: 13px;
        padding: 14px 24px;
        gap: 10px;
    }

    .results-separator .separator-icon {
        width: 18px;
        height: 18px;
    }
}

/* Separator with text */
.recommendations-separator {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.separator-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
}

.separator-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f5f5f5, #fff);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.separator-text .ai-icon {
    width: 20px;
    height: 20px;
    color: #4CAF50;
}

/* Recommendations list */
.recommendations-list {
    width: 100%;
}

/* Grid view for recommendations */
.recommendations-list.grid-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* List view for recommendations */
.recommendations-list.list-view {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
}

/* Slight visual distinction for recommendations */
.recommendation-card,
.recommendation-item {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #4CAF50, #81C784) border-box;
    border-radius: 12px;
}

.recommendation-card::before,
.recommendation-item::before {
    content: '✨';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 18px;
    z-index: 5;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 1200px) {
    .recommendations-list.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .recommendations-list.grid-view {
        grid-template-columns: 1fr;
    }

    .recommendations-separator {
        gap: 10px;
        padding: 0 10px;
    }

    .separator-text {
        font-size: 14px;
        padding: 6px 12px;
    }

    .separator-text .ai-icon {
        width: 16px;
        height: 16px;
    }
}

