/* ================================================================
   Zepto Portfolio — v1.4.0
   ================================================================ */

.zp-portfolio-wrap *,
.zp-portfolio-wrap *::before,
.zp-portfolio-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.zp-portfolio-wrap {
    width: 100%;
    font-family: inherit;
}

/* ================================================================
   HEADER ROW — column layout (title top, filter below)
   ================================================================ */

.zp-header-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 2.2rem;
}

.zp-title {
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #111;
    text-transform: uppercase;
    line-height: 1;
}

.zp-title-dot {
    color: #E8A317;
}

.zp-subtitle {
    font-size: 14px;
    color: #888;
    margin-top: 0.4rem;
}

/* ================================================================
   FILTER TABS
   ================================================================ */

.zp-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.zp-filter-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 4px 14px 8px;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    outline: none;
    white-space: nowrap;
}

.zp-filter-btn:hover {
    color: #111;
}

.zp-filter-btn.active {
    color: #E8A317;
    border-bottom: none;
}

.zp-count {
    font-size: 8px;
    font-weight: 600;
    vertical-align: super;
    margin-left: 1px;
    letter-spacing: 0;
    opacity: 0.8;
}

/* ================================================================
   LOADER
   ================================================================ */

.zp-loader {
    width: 100%;
    height: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.15s;
}

.zp-portfolio-wrap.is-loading .zp-loader {
    opacity: 1;
}

.zp-loader-bar {
    display: block;
    height: 100%;
    width: 0%;
    background: #E8A317;
    transition: width 0.4s ease;
}

/* ================================================================
   GRID
   ================================================================ */

.zp-grid {
    display: grid;
    gap: 15px;
    list-style: none;
}

.zp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.zp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.zp-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ================================================================
   ITEM
   ================================================================ */

.zp-item {
    position: relative;
    background: #f0f0f0;
    will-change: opacity;
    animation: zp-in 0.5s ease both;
}

.zp-item-inner {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* ================================================================
   IMAGE
   ================================================================ */

.zp-img-wrap {
    position: relative;
    overflow: hidden;
    margin: 15px;
    aspect-ratio: 3 / 3.8;
}

.zp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.zp-img-placeholder {
    width: 100%;
    height: 100%;
    background: #d8d8d8;
}

/* ================================================================
   OVERLAY — bottom bata maathi smooth slide
   ================================================================ */

.zp-item-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    z-index: 2;
    background: #111111;
    padding: 25px 25px;
    display: flex;
    flex-direction: column;
    gap: 5px;

    /* Slide up from bottom — suru ma completely hidden tala */
    transform: translateY(110%);
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Hover: smooth slide up */
.zp-item-inner:hover .zp-item-overlay {
    transform: translateY(0);
}

/* Hover: subtle image scale */
.zp-item-inner:hover .zp-img {
    transform: scale(1.04);
}

/* ================================================================
   OVERLAY CONTENT
   ================================================================ */

.zp-item-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #E8A317;
    line-height: 1;
}

.zp-item-cat::after {
    content: '';
    display: block;
    width: 26px;
    height: 1.5px;
    background: #E8A317;
    flex-shrink: 0;
}

.zp-item-title {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.3;
}

/* ================================================================
   HOVER STYLES (fade / zoom variants)
   ================================================================ */

.zp-hover-fade .zp-item-overlay {
    transform: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.zp-hover-fade .zp-item-inner:hover .zp-item-overlay {
    opacity: 1;
}

.zp-hover-zoom .zp-item-overlay {
    transform: translateY(8px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.zp-hover-zoom .zp-item-inner:hover .zp-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   INFINITE SCROLL — load more trigger + spinner
   ================================================================ */

.zp-load-more-trigger {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.zp-load-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid #ddd;
    border-top-color: #E8A317;
    border-radius: 50%;
    animation: zp-spin 0.7s linear infinite;
    display: none;
}

.zp-portfolio-wrap.is-loading-more .zp-load-spinner {
    display: block;
}

.zp-all-loaded {
    font-size: 12px;
    color: #bbb;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: none;
}

.zp-portfolio-wrap.zp-fully-loaded .zp-all-loaded {
    display: block;
}

@keyframes zp-spin {
    to { transform: rotate(360deg); }
}

/* ================================================================
   FILTER ANIMATIONS
   ================================================================ */

@keyframes zp-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes zp-out {
    to { opacity: 0; transform: scale(0.97); }
}

.zp-item.zp-hide {
    animation: zp-out 0.2s ease forwards;
    pointer-events: none;
}

.zp-item.zp-show {
    animation: zp-in 0.4s ease both;
}

.zp-item.zp-show:nth-child(1) { animation-delay: 0.00s; }
.zp-item.zp-show:nth-child(2) { animation-delay: 0.06s; }
.zp-item.zp-show:nth-child(3) { animation-delay: 0.12s; }
.zp-item.zp-show:nth-child(4) { animation-delay: 0.18s; }
.zp-item.zp-show:nth-child(5) { animation-delay: 0.24s; }
.zp-item.zp-show:nth-child(6) { animation-delay: 0.30s; }
.zp-item.zp-show:nth-child(7) { animation-delay: 0.36s; }
.zp-item.zp-show:nth-child(8) { animation-delay: 0.42s; }
.zp-item.zp-show:nth-child(9) { animation-delay: 0.48s; }

/* ================================================================
   EMPTY STATE
   ================================================================ */

.zp-no-items {
    text-align: center;
    padding: 3rem 0;
    color: #999;
    font-size: 14px;
    grid-column: 1 / -1;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1024px) {
    .zp-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .zp-cols-3,
    .zp-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .zp-filter-btn { padding: 4px 10px 8px; }
}

@media (max-width: 480px) {
    .zp-cols-2,
    .zp-cols-3,
    .zp-cols-4 { grid-template-columns: 1fr; }
}

/* ================================================================
   Screenshot-style UI refinement
   ================================================================ */

.zp-portfolio-wrap { max-width: 1280px; margin: 0 auto; }

.zp-title {
    font-size: 58px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: .9;
}

.zp-filter-bar { gap: 22px; }

.zp-filter-btn.active { border-bottom: 3px solid #e0a12b; }

.zp-grid { gap: 16px; }

.zp-item {
    background: #ececec;
    border-radius: 3px;
    overflow: hidden;
}

.zp-img-wrap {
    margin: 0;
    aspect-ratio: 1/1;
    background: #ececec;
}

.zp-img { filter: grayscale(100%); }

.zp-item-overlay { left: 0; right: 0; bottom: 0; }

@media (max-width: 1024px) {
    .zp-title { font-size: 44px; }
}

/* User category UI */
.zp-header-row {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 24px;
}

.zp-filter-bar {
    flex: unset;
    justify-content: flex-start;
    gap: 28px;
}

.zp-filter-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #888;
}

.zp-filter-btn:hover { color: #E8A317 !important; }

.zp-filter-btn.active {
    color: #E8A317 !important;
    border: none !important;
}

.zp-count { display: none !important; }

/* ================================================================
   ELEMENTOR-SPECIFIC OVERRIDES
   ================================================================ */

.elementor-11 .elementor-element.elementor-element-3414b41 .zp-item {
    border-radius: 8px;
}
