@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=Heebo:wght@300;400;500;700&display=swap');

:root {
    /* Japandi / Nordic Palette */
    /* Japandi / Nordic Palette - Softened */
    --bg-color: #F2F0E9;
    /* Softer, warm grey-beige (Bone) */
    --card-bg: #FAF9F6;
    /* Off-white (Baby Powder) instead of pure white */

    --text-primary: #44403C;
    /* Stone-700 - Softer Charcoal */
    --text-secondary: #78716C;
    /* Stone-500 - Muted warm grey */

    --accent: #44403C;
    /* Matching text for consistency */
    --accent-light: #E7E5E4;
    /* Stone-200 */

    --border-color: #D6D3D1;
    /* Slightly darker to maintain definition with softer bg */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Heebo', 'Outfit', sans-serif;
}

body {
    direction: rtl;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header & Identity */
header {
    text-align: center;
    margin-bottom: 5rem;
    padding-top: 3rem;
}

.brand-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo-container {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-family: 'Outfit', sans-serif;
    font-size: 5rem;
    font-weight: 300;
    line-height: 1;
    font-style: italic;
}

/* The Integral */
header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 300;
}

/* Search */
.search-container {
    max-width: 500px;
    margin: 0 auto 4rem;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--text-secondary);
    box-shadow: var(--shadow-md);
}

/* Grid & Cards */
.brands-grid,
.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.brand-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #D6D3D1;
}

.brand-header,
.coupon-context-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bg-color);
}

.brand-logo-container,
.context-brand-logo {
    width: 80px;
    height: 80px;
    background: #F5F5F4;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-logo-container img,
.context-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Coupon Internal */
.coupon-list {
    display: flex;
    flex-direction: column;
}

.coupon-list .coupon-item+.coupon-item {
    border-top: 1px dashed var(--border-color);
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}

.coupon-item {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.coupon-discount {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.influencer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.influencer-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.influencer-link:hover {
    text-decoration: underline;
    color: var(--text-primary);
}

.coupon-code-wrapper {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
    /* Cut-out effect */
    border: 1px dashed #D6D3D1;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.coupon-code {
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.copy-btn,
.discount-link-btn {
    background: var(--text-primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

.copy-btn:hover,
.discount-link-btn:hover {
    background: #44403C;
    transform: translateY(-1px);
}

.coupon-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    line-height: 1.4;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-card {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Brand Page Specifics */
.brand-page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.brand-header-section {
    text-align: center;
    margin-bottom: 4rem;
}

.brand-logo-large {
    width: 120px;
    height: 120px;
    background: var(--card-bg);
    border-radius: 50%;
    padding: 1.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-large img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-website-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    border: 1px solid var(--text-primary);
    border-radius: 100px;
    font-weight: 500;
    transition: all 0.2s;
}

.brand-website-btn:hover {
    background: var(--text-primary);
    color: white;
}

/* Influencer Page Specifics */
.influencer-header {
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 2rem;
}

.influencer-profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    padding: 4px;
    background: var(--card-bg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.influencer-name-large {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.influencer-role {
    display: inline-block;
    background: var(--border-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.influencer-bio {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: 0.2s;
    font-size: 0.9rem;
    background: var(--card-bg);
}

.social-link:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Navigation Back */
.back-nav {
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.back-link:hover {
    color: var(--text-primary);
}

/* Footer */
.site-footer {
    margin-top: 6rem;
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem;
    background: var(--bg-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        text-align: right;
    }
}

/* Align right on RTL desktop */
.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-link {
    color: var(--text-secondary);
    transition: 0.2s;
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-link-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-credits {
    font-weight: 500;
}

/* Toast */
#toast {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--text-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}