/* =========================================================
   1. GLOBAL THEME
========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}
html, body{
    overflow-x: hidden;
}
body {
    background: #f4f7fb;
    font-family: Arial, sans-serif;
    margin: 0;
    color: #1f2937;
}

/* ================= TOPBAR ================= */
.topbar {
    width: 100%;
    position: relative;
    background: #000000; /* ðŸ”¥ negru pur */
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}

/* RGB LINE */
.topbar::before {
    content: "";
    position: absolute;
    width: 300%;
    height: 3px;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg,
        #4285F4,
        #DB4437,
        #F4B400,
        #0F9D58,
        #4285F4
    );
    animation: rgbFlow 8s linear infinite;
}

@keyframes rgbFlow {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.topbar-inner {
    max-width: 1700px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    gap: 15px;
}

/* ================= LOGO ================= */
.logo {
    display: flex;
    align-items: center;
}

.google-logo {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 10px 18px;
    border-radius: 30px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    position: relative;
}

.google-logo span {
    position: relative;
    font-size: 32px;
    font-weight: 700;
}

/* colors */
.google-logo span:nth-child(1){color:#4285F4;}
.google-logo span:nth-child(2){color:#DB4437;}
.google-logo span:nth-child(3){color:#F4B400;}
.google-logo span:nth-child(4){color:#4285F4;}
.google-logo span:nth-child(5){color:#0F9D58;}
.google-logo span:nth-child(6){color:#DB4437;}

/* ================= SEARCH ================= */
.search-box form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border-radius: 50px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,0.1);
}

.search-box input {
    background: transparent;
    border: none;
    padding: 12px 18px;
    color: white;
    outline: none;
    width: 280px;
}

.search-box button {
    background: linear-gradient(135deg, #4285F4, #0F9D58);
    border: none;
    padding: 10px 16px;
    border-radius: 40px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    transition: 0.3s;
}

/* ================= NAV ================= */
.nav-links {
    display: flex;
    flex-wrap: wrap;      /* ðŸ”¥ CHEIA FIX */
    gap: 10px;
    justify-content: flex-end;
    max-width: 700px;
}

.nav-links a {
    text-decoration: none;
    color: #aaa;
    padding: 8px 14px;
    position: relative;
    transition: 0.3s;
    border-radius: 12px;
}

.nav-links a:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

/* underline glow */
.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 10%;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg,
        #4285F4,
        #DB4437,
        #F4B400,
        #0F9D58
    );
    transition: 0.4s;
}

.nav-links a:hover::after {
    width: 80%;
}

/* BUTTON */
.btn-link {
    background: linear-gradient(135deg, #DB4437, #F4B400);
    padding: 8px 16px;
    border-radius: 30px;
    color: white !important;
}

/* USER */
.user-chip {
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid #4285F4;
    color: #4285F4;
    font-size: 13px;
}

/* WRAPPER */
.cat-wrapper{
    position:relative;
    display:inline-flex;
    align-items:center;
    gap:8px;
    cursor:default; /* important: NU pare clickable */
}

/* ICON ANIMAT */
.cat-engine{
    display:flex;
    gap:3px;
    align-items:flex-end;
    opacity:0.7;
    transition:0.2s ease;
}

/* hover subtil (nu efect de buton) */
.cat-wrapper:hover .cat-engine{
    opacity:1;
}

/* BARS */
.bar{
    width:3px;
    height:10px;
    background:#F4B400;
    animation:bars 1.2s infinite;
    border-radius:1px;
}

.bar:nth-child(2){animation-delay:0.2s;}
.bar:nth-child(3){animation-delay:0.4s;}

@keyframes bars{
    0%,100%{height:6px; opacity:0.6;}
    50%{height:14px; opacity:1;}
}

/* INFO ICON */
.info-icon{
    position:absolute;
    top:-6px;
    right:-6px;
    width:14px;
    height:14px;
    font-size:10px;
    border-radius:50%;
    background:#ddd;
    color:#111;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:bold;
}

.nav-links,
.topbar,
.topbar-inner{
    overflow: visible !important;
}



/* săgeata jos (ca să arate corect) */
.cat-tooltip{
    position:absolute;
    top:calc(100% + 12px);
    left:50%;
    transform:translateX(-50%);

    background:#111;
    color:#fff;
    padding:8px 10px;
    font-size:11px;
    border-radius:6px;

    max-width:240px;
    text-align:center;
    white-space:normal;

    opacity:0;
    visibility:hidden;
    transition:0.2s ease;
    pointer-events:none;

    z-index:99999;
}

.cat-tooltip::after{
    content:"";
    position:absolute;
    bottom:100%;
    left:50%;
    transform:translateX(-50%);

    border-width:6px;
    border-style:solid;
    border-color:transparent transparent #111 transparent;
}

/* hover */
.cat-wrapper{
    position:relative;
    display:inline-flex;
    align-items:center;
    gap:8px;
    cursor:default;
    z-index:999;
}

.cat-wrapper:hover .cat-tooltip{
    opacity:1;
    visibility:visible;
}

/* small hint text (optional) */
.hint-text{
    font-size:10px;
    color:#888;
    margin-left:6px;
}
/* =========================================================
   2. LAYOUT SYSTEM
========================================================= */
.container {
    max-width: 1200px;
    margin: 20px auto;
}

.row {
    display: flex;
    gap: 22px;
    justify-content: center;
    align-items: flex-start;
}

.col-md-4 {
    flex: 0 0 320px;
}

.col-md-8 {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   3. APP LAYOUT (SIDEBAR + CONTENT)
========================================================= */
.app-layout {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 15px;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 15px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.content {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   4. CARDS
========================================================= */
.card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 15px;
}

.shadow,
.shadow-sm {
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

/* =========================================================
   5. BUTTONS
========================================================= */
.btn {
    border-radius: 10px !important;
    font-weight: 600;
}

.btn-primary {
    background: #2563eb;
    border: none;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(34,197,94,0.25);
}

/* =========================================================
   6. SIDEBAR CATEGORY TREE - GOOGLE STYLE
========================================================= */

/* ================= CATEGORY ITEM ================= */
#catBox div {
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    transition: all 0.25s ease;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

/* Google-like left color bar */
#catBox div::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        #4285f4, /* Google Blue */
        #ea4335, /* Red */
        #fbbc05, /* Yellow */
        #34a853  /* Green */
    );
    opacity: 0.85;
}

/* ================= HOVER EFFECT ================= */
#catBox div:hover {
    transform: translateZ(0); 
    background: #ffffff;
    border-color: #4285f4;
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.25);
}

/* Animated glow on hover */
#catBox div:hover::before {
    opacity: 1;
    filter: blur(0.5px);
}

/* ================= CLICK EFFECT ================= */
#catBox div:active {
    transform: scale(0.98);
}

/* ================= HEADER (BACK / BREADCRUMB) ================= */
#catHeader div {
    padding: 8px 12px;
    background: linear-gradient(135deg, #f1f5f9, #ffffff);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    transition: 0.2s;
}

#catHeader div:hover {
    background: #e8f0fe;
    border-color: #4285f4;
    transform: translateX(3px);
}


/* ================= CURRENT CATEGORY CARD (GOOGLE STYLE FIXED) ================= */
#currentCategoryAction > div {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
    color: #fff !important;
    padding: 14px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(66, 133, 244, 0.4);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* ðŸ”¥ Google glow background (FIXED layering) */
#currentCategoryAction > div::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        #4285f4,
        #ea4335,
        #fbbc05,
        #34a853
    );
    opacity: 0.18;
    filter: blur(18px);
    z-index: 0;
}

/* ðŸ§  content must stay above glow */
#currentCategoryAction > div > * {
    position: relative;
    z-index: 2;
}

/* ================= VIEW BUTTON ================= */
#currentCategoryAction > div div:last-child {
    background: #fff;
    color: #111;
    padding: 7px;
    text-align: center;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.2s ease;
}

#currentCategoryAction > div div:last-child:hover {
    background: #4285f4;
    color: #fff;
    transform: scale(1.05);
}


/* ================= CATEGORY ITEM (GOOGLE STYLE CLEAN) ================= */
#catBox div {
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

#catBox div:hover {
  border-color: #4285f4;
  box-shadow: 0 8px 18px rgba(66,133,244,0.12);
  transform: scale(1.02);
}

/* ðŸ”µ Google left color bar (pÄƒstrat) */
#catBox div::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        #4285f4,
        #ea4335,
        #fbbc05,
        #34a853
    );
    opacity: 0.85;
}

/* ================= HOVER EFFECT ================= */


/* ================= SLOW GOOGLE SHIMMER (ONLY ON HOVER) ================= */
#catBox div::after {
    content: "";
    position: absolute;
    top: 0;
    left: -180%;
    width: 180%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(66, 133, 244, 0.15),
        rgba(234, 67, 53, 0.15),
        rgba(251, 188, 5, 0.15),
        transparent
    );

    transform: skewX(-20deg);
    opacity: 0;
}

/* ðŸ”¥ porneÈ™te DOAR la hover */
#catBox div:hover::after {
    opacity: 1;
    animation: googleSlowShimmer 2.2s ease-in-out infinite;
}

@keyframes googleSlowShimmer {
    0% {
        left: -180%;
    }
    100% {
        left: 180%;
    }
}

/* click feel */
#catBox div:active {
    transform: scale(0.98);
}
/* =========================================================
   7. KEYWORDS
========================================================= */
#categoryKeywords span,
#selectedKeywords span {
    display: inline-block;
    padding: 6px 10px;
    margin: 4px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
}

#categoryKeywords span {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

#categoryKeywords span:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

#selectedKeywords span {
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

/* =========================================================
   8. FORM (ADD AD)
========================================================= */
.mb-3 {
    margin-bottom: 18px !important;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: 0.2s;
    overflow: hidden;
}

.mb-3:hover {
    background: #f1f5ff;
    border-color: #93c5fd;
}

.form-label {
    font-weight: 800;
    font-size: 13px;
    color: #334155;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 5px rgba(59,130,246,0.15);
}

textarea.form-control {
    min-height: 180px;
    line-height: 1.5;
}

input[name="title"].form-control {
    font-size: 18px;
    font-weight: 600;
}

input[name="price"].form-control {
    font-size: 17px;
    font-weight: 600;
}

input[type="file"] {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
}

/* =========================================================
   9. IMAGE PREVIEW
========================================================= */
#imagePreview div {
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* =========================================================
   10. CATEGORY PAGE (ADS LIST)
========================================================= */
.page-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.page-title {
    font-size: 28px;
    font-weight: 900;
    margin: 15px 0;
    color: #0f172a;
}

.breadcrumb {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #2563eb;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.ad-card {
    display: block;
    text-decoration: none;
    color: inherit;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #ffffff 40%,

        #8AB4F8 55%,
        #F28B82 68%,
        #FDD663 82%,
        #81C995 95%,

        #f3f4f6 100%
    );

    overflow: hidden;
}

.ad-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.ad-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.ad-card a {
    text-decoration: none;
    color: #0f172a;
}

.ad-card a:hover {
    color: #2563eb;
}

.ad-card p {
    font-size: 13px;
    color: #64748b;
    max-height: 60px;
    overflow: hidden;
}

.price {
    margin-top: 10px;
    font-weight: 900;
    color: #16a34a;
}

/* =========================================================
   11. AD PAGE (DETAIL)
========================================================= */
.ad-page {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 15px;
}

.ad-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 20px;
    color: #0f172a;
}

.ad-layout {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.ad-image {
    flex: 1;
    min-width: 320px;
}

.ad-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    object-fit: contain;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.no-image {
    width: 100%;
    max-width: 500px;
    height: 300px;
    background: #f1f5f9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.ad-info {
    flex: 1;
    min-width: 280px;
}

.ad-info .price {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 15px;
}

/* =========================================================
   12. PAGINATION
========================================================= */
.pagination {
    margin-top: 25px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 7px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: #0f172a;
}

.pagination a.active {
    background: #0f172a;
    color: #fff;
}


/* ================= MY ADS PAGE ================= */
.page {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
}

.page h1 {
    font-size: 28px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 15px;
}

/* ADD BUTTON */
.page a[href="/user/addAd"] {
    display: inline-block;
    margin-bottom: 15px;
    padding: 10px 14px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: 0.2s;
}

.page a[href="/user/addAd"]:hover {
    background: #1d4ed8;
}

/* ADS LIST */
.myads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* SINGLE AD CARD */
.myad-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;

    will-change: transform;
}

/* TEXT */
.myad-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.myad-card p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
    max-width: 500px;
}

/* DELETE BUTTON */
.myad-card a {
    padding: 8px 12px;
    background: #ef4444;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    transition: 0.2s;
}

.myad-card a:hover {
    background: #dc2626;
}

.ad-thumb {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
}

.ad-thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.ad-thumb-small {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}



.keywords {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #bae6fd;
    transition: 0.2s;
}

.keyword-badge:hover {
    background: #bae6fd;
    transform: translateY(-2px);
}

.comment-form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* =========================================================
   COMMENT FORM (INTEGRATED THEME STYLE)
========================================================= */

.comment-form {
    max-width: 600px;
    margin: 25px auto;
    padding: 18px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: 0.2s ease;
}

/* hover subtle like cards */
.comment-form:hover {
    box-shadow: 0 10px 30px rgba(37,99,235,0.10);
    border-color: #cbd5e1;
}

/* INPUTS + TEXTAREA (match form-control style din proiectul tÄƒu) */
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 15px;
    transition: all 0.2s ease;
    outline: none;
}

/* focus like your .form-control */
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 5px rgba(59,130,246,0.12);
}

/* textarea height */
.comment-form textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

/* BUTTON (same system as btn-primary) */
.comment-form button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s ease;
}

/* hover effect consistent with your theme */
.comment-form button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37,99,235,0.25);
}

/* active click feel */
.comment-form button:active {
    transform: scale(0.98);
}

.messages-link {
    margin-top: 8px;
}

/* scoate stilul default de link */
.messages-link-a {
    text-decoration: none;
    color: #2563eb; /* albastru modern ca la tine */
    font-weight: 700;
    font-size: 13px;
    display: inline-block;
    transition: 0.2s;
}

/* hover */
.messages-link-a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* optional badge style pentru numÄƒr */
.messages-link-a b {
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 12px;
    margin-left: 4px;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    flex: 1;
    display: flex;
    justify-content: center;
}

.search-box form {
    display: flex;
    width: 100%;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 20px 0 0 20px;
    outline: none;
}

.search-box button {
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 20px 20px 0;
    background: #fff;
    cursor: pointer;
}


.search-title {
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: 600;
}

.search-empty {
    color: #777;
    font-size: 16px;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* link wrapper */
.search-item-link {
    text-decoration: none;
    color: inherit;
}

/* card */
.search-item {
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    transition: 0.2s ease;
}

.search-item:hover {
    border-color: #aaa;
    transform: translateY(-1px);
}

/* content */
.search-item-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.search-item-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}

.search-item-keywords {
    font-size: 12px;
    color: #888;
}

/* pagination */
.search-pagination {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-link {
    text-decoration: none;
    color: #007bff;
}

.page-link:hover {
    text-decoration: underline;
}

.slider {
    position: relative;
    width: 100%;
    
}

.slider img {
    width: 100%;
    height: 100%;
    max-height: 500px; /* sau scoate-l dacă vrei perfect fluid */
    object-fit: contain; /* FIX pentru ads / produse */
    border-radius: 10px;
    display: block;
    background: #fff;
}

/* butoane */
.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
}

.prev { left: 10px; }
.next { right: 10px; }

.nav:hover {
    background: rgba(0,0,0,0.8);
}

/* thumbnails */
.thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
    opacity: 0.7;
}

.thumb:hover {
    opacity: 1;
}

.alphabet a {
    display:inline-block;
    padding:5px 8px;
    margin:2px;
    border:1px solid #ddd;
    text-decoration:none;
    color:#333;
}

.alphabet a:hover {
    background:#000;
    color:#fff;
}

.active {
    background:#000 !important;
    color:#fff !important;
}

.keyword-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.keyword-item .desc {
    display: block;
    margin-left: 0;
    margin-top: 3px;
}

.keyword-item a:hover {
    text-decoration:underline;
}

.desc {
    font-size:12px;
    color:#777;
    margin-left:10px;
}


.ad-title a {
    color: #0f172a; /* aceeași ca titlul */
    text-decoration: none;
    transition: 0.2s ease;
}

.ad-title a:hover {
    opacity: 0.85;
}

.ad-title {
    position: relative;
    display: inline-block;
}

/* linia de sub titlu */
.ad-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 2px;
    width: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(15, 23, 42, 0.2),
        rgba(15, 23, 42, 0.6),
        rgba(15, 23, 42, 0.2),
        transparent
    );

    transform: scaleX(0);
    transform-origin: left;
    animation: underlineLoad 2.2s ease-in-out infinite;
}

/* animația de “încărcare” */
@keyframes underlineLoad {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }
    40% {
        transform: scaleX(1);
        opacity: 1;
    }
    100% {
        transform: scaleX(0);
        opacity: 0;
    }
}


.ad-external-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-top: 12px;
    padding: 10px 14px;

    font-size: 14px;
    font-weight: 700;
    text-decoration: none;

    color: #0f172a;
    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    position: relative;
    overflow: hidden;

    transition: all 0.2s ease;
}

/* icon */
.ad-external-link::before {
    content: "↗";
    font-size: 14px;
    opacity: 0.7;
}

/* shimmer light sweep */
.ad-external-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: -140%;
    width: 140%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(15, 23, 42, 0.05),
        rgba(15, 23, 42, 0.12),
        transparent
    );

    transform: skewX(-20deg);
    transition: 0.6s ease;
}

/* hover state */
.ad-external-link:hover {
    transform: translateY(-2px);
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

/* shimmer animation trigger */
.ad-external-link:hover::after {
    left: 140%;
}


@keyframes titleShimmer {
    0% {
        left: -150%;
    }
    100% {
        left: 150%;
    }
}

.affiliate-note {
    font-size: 11px;
    color: #777;
}
/* =========================================================
   13. RESPONSIVE
========================================================= */
@media (max-width: 900px) {
    .row,
    .app-layout,
    .ad-layout {
        flex-direction: column;
    }

    .sidebar,
    .col-md-4,
    .col-md-8 {
        width: 100%;
    }
}

.ads-grid img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
}

img {
    image-rendering: auto;
    transform: translateZ(0);
}

.alphabet-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.alphabet-nav a {
    padding: 5px 10px;
    border: 1px solid #ccc;
    text-decoration: none;
}

.brand-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.brand-item {
    padding: 6px 10px;
    background: #f3f3f3;
    border-radius: 6px;
    text-decoration: none;
}

/* ================= LUX BANNER ================= */
.lux-banner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;

    gap: 30px;
    padding: 35px;

    max-width: 1400px;
    width: 100%;
    margin: 20px auto;

    border-radius: 18px;
    background: linear-gradient(135deg, #0f0f0f, #1b1b1b);
    color: #fff;

    box-shadow: 0 25px 70px rgba(0,0,0,0.7);
}

/* LEFT SIDE */
.lux-left {
    flex: 1;
    min-width: 280px;
}

/* TEXT */
.lux-title {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 10px;
}

.lux-subtitle {
    font-size: 15px;
    opacity: 0.75;
    margin-bottom: 15px;
}

.lux-price {
    font-size: 26px;
    font-weight: bold;
    color: #00ffb3;
    margin-bottom: 20px;
}

/* BUTTON */
.lux-btn {
    display: inline-block;
    padding: 14px 26px;
    background: linear-gradient(90deg, #ff5f6d, #ffc371);
    color: #000;
    font-weight: bold;
    text-decoration: none;
    border-radius: 12px;
    transition: 0.3s ease;
}

.lux-btn:hover {
    transform: scale(1.05);
}

/* RIGHT SIDE */
.lux-right {
    flex: 1.4;
    min-height: 300px;
    display: flex;
}

/* GALLERY GRID */
.lux-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;

    width: 100%;
    height: 100%;
    min-height: 220px;
}

/* IMAGES (FIXED VISIBILITY) */
.lux-gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;

    border-radius: 14px;
    display: block;

    opacity: 1;
    visibility: visible;

    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: 0.25s ease;
}

.lux-gallery img:hover {
    transform: scale(1.06);
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    .lux-banner {
        flex-direction: column;
        text-align: center;
    }

    .lux-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .lux-gallery {
        grid-template-columns: 1fr;
    }

    .lux-gallery img {
        height: 200px;
    }
}

/* =========================================================
   KEYWORD EXPLORE ADS (NEW UI)
========================================================= */

.keyword-explore-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:14px;
    margin-top:20px;
}

/* CARD */
.keyword-explore-card{
    display:block;
    text-decoration:none;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:14px;
    padding:14px;
    position:relative;
    overflow:hidden;
    transition:0.25s ease;
}

/* hover */
.keyword-explore-card:hover{
   
    box-shadow:0 12px 30px rgba(0,0,0,0.08);
    border-color:#cbd5e1;
}

/* URL gri mic */
.ke-url{
    font-size:11px;
    color:#94a3b8;
    margin-bottom:6px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* TITLU */
.ke-title{
    font-size:15px;
    font-weight:800;
    color:#0f172a;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
}

/* ICON rotund amazon */
.ke-icon{
    width:26px;
    height:26px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#f1f5f9;
    font-size:14px;
}

/* SNIPPET */
.ke-snippet{
    font-size:12px;
    color:#64748b;
    margin-top:8px;
    line-height:1.4;
}

/* LOADING BAR SUB TITLU */
.ke-loader{
    height:2px;
    width:100%;
    margin:10px 0 8px;
    background:linear-gradient(90deg,#3b82f6,#f59e0b,#ef4444,#22c55e);
    background-size:300% 100%;
    animation:keLoad 2.5s linear infinite;
    border-radius:4px;
    opacity:0.7;
}

@keyframes keLoad{
    0%{background-position:0% 0;}
    100%{background-position:300% 0;}
}
/* ================= LEGAL DROPDOWN ================= */

.legal-dropdown{
    position:relative;
    display:inline-block;
}

/* BUTTON STYLE = SAME AS MENU LINKS */
.dropdown-btn{
    text-decoration:none;
    color:#aaa;

    padding:8px 14px;

    position:relative;
    transition:0.3s;
    border-radius:12px;

    background:none;
    border:none;
    cursor:pointer;
    font:inherit;
}

/* HOVER */
.dropdown-btn:hover{
    color:white;
    background:rgba(255,255,255,0.05);
}

/* RGB UNDERLINE */
.dropdown-btn::after{
    content:"";
    position:absolute;
    bottom:2px;
    left:10%;
    width:0%;
    height:2px;

    background:linear-gradient(
        90deg,
        #4285F4,
        #DB4437,
        #F4B400,
        #0F9D58
    );

    transition:0.4s;
}

.dropdown-btn:hover::after{
    width:80%;
}

/* DROPDOWN BOX */
.dropdown-content{
    display:none;

    position:absolute;
    top:100%;
    left:0;

    min-width:180px;

    background:#111;

    border:1px solid rgba(255,255,255,0.08);

    border-radius:14px;

    padding:8px;

    z-index:99999;

    box-shadow:0 15px 35px rgba(0,0,0,0.35);
}

/* LINKS */
.dropdown-content a{
    display:block;

    padding:10px 14px;

    border-radius:10px;

    text-decoration:none;

    color:#ccc;

    transition:0.25s ease;
}

/* HOVER LINKS */
.dropdown-content a:hover{
    background:rgba(255,255,255,0.06);
    color:#fff;
}

/* SHOW MENU */
.legal-dropdown:hover .dropdown-content{
    display:block;
}

.desc-text {
  white-space: normal;
}