/* --- ROOT VARIABLES & THEME --- */
:root {
    /* Fonts */
    --font-main: 'Inter', sans-serif;
    --font-brand: 'Sardin DEMO', serif;

    /* Light Mode Colors */
    --bg-color: #f4f4f9;
    --text-color: #1a1a1a;
    --text-muted: #666;
    --card-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --accent: #000; 
    --accent-text: #fff;
    --shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --text-muted: #aaa;
    --card-bg: rgba(20, 20, 20, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #fff; 
    --accent-text: #000;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* --- FONT LOADING --- */
@font-face {
    font-family: 'Sardin DEMO';
    src: url('font/Sardin DEMO.otf') format('opentype');
    font-display: swap;
}
@font-face {
    font-family: 'Besthany';
    src: url('font/Besthany.ttf') format('truetype');
    font-display: swap;
}

/* --- RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
body {
    font-family: var(--font-main);
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}
h1, h2, h3, .brand-logo { font-family: var(--font-brand); }
a { text-decoration: none; color: inherit; }
img { display: block; }

/* --- UTILITIES --- */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    border-radius: 16px;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.fade-in-up { animation: fadeInUp 0.8s ease forwards; opacity: 0; transform: translateY(20px); }

/* --- HEADER --- */
header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand-logo { font-size: 1.8rem; font-weight: bold; letter-spacing: 1px; }
.nav-menu { display: flex; gap: 25px; align-items: center; }
.nav-menu a { font-weight: 500; font-size: 0.95rem; opacity: 0.8; position: relative; }
.nav-menu a:hover { opacity: 1; }
.nav-menu a::after {
    content:'';
    display:block;
    width:0;
    height:2px;
    background:var(--text-color);
    transition:0.3s;
}
.nav-menu a:hover::after { width:100%; }
.theme-btn { cursor: pointer; font-size: 1.2rem; padding: 5px; border-radius: 50%; }

/* --- HERO SECTION (Cover + Profile) --- */
.hero-section { position: relative; margin-bottom: 100px; }

.cover-container {
    width: 100%;
    height: 350px;
    overflow: hidden;
    position: relative;
}
.cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}
.profile-wrapper {
    margin-top: -75px;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    flex-direction: column;
}
.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: float 6s ease-in-out infinite;
    margin-left: auto;
    margin-right: auto;
}
.hero-info { margin-top: 15px; }
.hero-info h1 { font-size: clamp(3rem, 7vw, 6rem); }
.tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}
.quote { font-style: italic; font-size: 0.85rem; opacity: 0.6; }

/* --- SOCIAL CARDS (Home) --- */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
    padding-bottom: 60px;
}
.social-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.social-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}
.card-left { display: flex; align-items: center; gap: 15px; }
.card-icon {
    width: 40px; height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.card-text h4 { font-size: 1rem; margin-bottom: 2px; }
.card-text span { font-size: 0.8rem; opacity: 0.7; }

.card-btn {
    padding: 8px 18px;
    border-radius: 50px;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.card-btn:hover {
    background: transparent;
    border-color: var(--accent);
    color: var(--text-color);
}

/* --- PHOTOS / REELS GRID --- */
/* 3 columns desktop, 2 columns tablet+mobile */
.media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}
.media-item { overflow: hidden; padding-bottom: 10px; }

/* main media inside Insta-style card / reels / photos */
.media-content {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    cursor: pointer;
}
.video-content { height: 450px; background: #000; }

/* ACTION + COMMENTS */
.action-bar {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.like-btn {
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}
.like-btn.liked { color: #e74c3c; }

.comment-box { padding: 0 15px 15px; }
.comment-input {
    width: 100%;
    padding: 10px;
    background: rgba(128,128,128,0.1);
    border: none;
    border-radius: 8px;
    color: var(--text-color);
    outline: none;
}
.comments-list {
    margin-top: 10px;
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.8rem;
}
.comment-single {
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(128,128,128,0.1);
}

/* --- INSTAGRAM STYLE CARD (Photos page) --- */
.insta-card { padding: 0; display: flex; flex-direction: column; }

.insta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.insta-user { display: flex; align-items: center; gap: 8px; }
.insta-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.insta-username { font-size: 0.9rem; font-weight: 600; }
.insta-sub { font-size: 0.75rem; opacity: 0.7; }
.insta-menu { font-size: 1.4rem; opacity: 0.7; }

.insta-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}
.insta-slide { display: none; }
.insta-slide.active { display: block; }
.insta-slide img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.insta-footer {
    padding: 8px 14px 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.insta-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.insta-left-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}
.icon-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
}
.insta-right-icon { font-size: 1.3rem; cursor: pointer; }
.insta-likes-text {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* dots for multi-image posts */
.insta-dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 6px 0 2px;
}
.insta-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
}
.insta-dot.active {
    background: #fff;
}

/* --- ABOUT & BUY & CONTACT --- */
.content-section { padding: 40px; margin-bottom: 20px; }
.section-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    padding-bottom: 5px;
}
.text-block { line-height: 1.7; opacity: 0.9; margin-bottom: 20px; }

/* Contact Form */
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
    font-family: inherit;
}
.submit-btn {
    padding: 15px;
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

/* Buy Page Card */
.product-card { text-align: center; padding: 30px; }
.product-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
}
.price {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
    margin: 15px 0;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* --- RESPONSIVE (MOBILE) --- */
.mobile-toggle { display: none; font-size: 1.8rem; cursor: pointer; }

@media (max-width: 992px) {
    .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .nav-menu {
        position: fixed;
        top: 0; right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }
    .nav-menu.active { right: 0; }
    .cover-container { height: 250px; }
    .hero-info h1 { font-size: 2rem; }
    .profile-img { width: 120px; height: 120px; }
    .social-grid { grid-template-columns: 1fr; }
}

/* ABOUT PAGE — Use Besthany for section titles only */
body[data-page="about"] .section-title {
    font-family: 'Besthany', serif !important;
    font-size: clamp(1.8rem, 4vw, 4.2rem);
    line-height: 1.2;
    letter-spacing: 1px;
}
/* INSTAGRAM STYLE SLIDER FIX */
.insta-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
}

.insta-slide {
    display: none;
    width: 100%;
    height: auto;
}

.insta-slide.active {
    display: block;
}

.insta-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 14px;
}

/* Dots */
.insta-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 10px 0 5px 0;
}

.insta-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #777;
    cursor: pointer;
}

.insta-dot.active {
    background: #fff;
}

/* Swipe smoothness */
.insta-slider {
    transition: all 0.3s ease-in-out;
}
/* ---------------- INSTAGRAM STYLE SLIDER FIX ---------------- */

.insta-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    transition: all 0.3s ease;
}

.insta-slide {
    display: none;
    width: 100%;
}

.insta-slide.active {
    display: block;
}

.insta-slide img {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
}

/* Dots */
.insta-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 10px 0 5px 0;
    padding-bottom: 5px;
}

.insta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #777;
    cursor: pointer;
    transition: 0.25s;
}

.insta-dot.active {
    background: #ff3b3b;
    transform: scale(1.4);
}
/* Smooth transition for slides */
.insta-slide {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.insta-slide.active {
    opacity: 1;
    transform: translateX(0);
}

/* Better easing for image load */
.insta-slide img {
    transition: transform 0.4s ease;
}

/* Optional slight zoom-in effect */
.insta-slide.active img {
    transform: scale(1.02);
}
.insta-slider {
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
