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

/* ============================================================
   GLOBAL DESIGN SYSTEM — COLORS & TYPOGRAPHY
============================================================ */
:root {
    --clr-main: #FFBD59;
    --clr-font: #FFFFFF;
    --clr-secondary: #FFBD59;
    --clr-error: #ED0000;
    --clr-success: #56C035;
    --white-10: #FFFFFF1A;
    --white-20: #FFFFFF33;
}

html, body {
    height: 100%;
    overflow: hidden; /* disable page scroll */
}

body {
    background: #0F0F0F;
    color: var(--clr-font);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

/* ============================================================
   FIXED SCROLL SYSTEM (FINAL — DO NOT MODIFY)
   This ensures no cropping, no double scrollbars, and perfect fit
============================================================ */

/* 1. admin-main: fixed height, contains scroll area */
.admin-main {
    height: calc(100vh - 48px) !important; /* matches sidebar height */
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 2. admin-main-inner: flex column wrapper */
.admin-main-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 36px 44px !important;
    overflow: hidden !important;
}

/* 3. page-scroll-area: ONLY scroll container */
.page-scroll-area {
    flex-grow: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important; /* fix clipping on right side */
    height: auto !important;
    max-height: none !important;
}

    /* 4. Bootstrap row clipping fix */
    .page-scroll-area > .row,
    .page-scroll-area > .px-3 > .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* custom scrollbar */
    .page-scroll-area::-webkit-scrollbar {
        width: 10px;
    }

    .page-scroll-area::-webkit-scrollbar-thumb {
        background: var(--clr-main);
        border-radius: 10px;
    }

    .page-scroll-area::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.05);
    }

/* ============================================================
   TITLES & HEADINGS
============================================================ */
h2.text-light.fw-bold {
    color: var(--clr-main) !important;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn-main {
    background: var(--clr-main);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 12px;
    color: black;
    transition: 0.15s;
}

    .btn-main:hover {
        opacity: 0.9;
    }

.btn-secondary {
    background: #333;
    border-radius: 12px;
    color: white;
    font-weight: 500;
}

    .btn-secondary:hover {
        background: #444;
    }
/* ============================================================
   SAVE / CANCEL BUTTONS
============================================================ */
.cancel-btn {
    padding: 10px 22px;
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    border-radius: 10px;
    text-decoration: none !important;
}

/* ============================================================
   HEADER STYLES
============================================================ */
.edit-header {
    padding-top: 10px;
}

.edit-back-arrow {
    font-size: 28px;
    color: var(--clr-main);
    text-decoration: none;
}

    .edit-back-arrow:hover {
        opacity: 0.7;
    }

.edit-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--clr-main);
}

.edit-subtext {
    margin-top: 4px;
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    max-width: 450px;
}

/* ============================================================
   PRODUCT CARD (INDEX PAGE)
============================================================ */

.aero-image-wrapper {
    width: 100%;
    height: 100%; /* force it to match card height */
    overflow: hidden;
    position: relative;
}


.aero-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.aero-product-card:hover .aero-product-image {
    transform: scale(1.12);
    filter: brightness(0.35);
}

/* Centered overlay buttons */
.aero-product-actions {
    display: inline-flex;
    gap: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

.aero-product-card:hover .aero-product-actions {
    opacity: 1;
    visibility: visible;
}

.aero-btn-primary {
    background: #ffbd59;
    color: #151515;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    border: none;
}

.aero-btn-ghost {
    background: transparent;
    color: #f7f7f7;
    border-radius: 12px;
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.35);
}

/* ============================================================
   GLOBAL SCROLLBAR OVERRIDE
============================================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--clr-main);
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

/* ============================================================
   INPUTS & TEXTAREAS
============================================================ */
.product-input,
.product-textarea,
.feature-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.18);
    color: white;
    border-radius: 10px;
    padding: 12px 16px;
}

    .product-input:focus,
    .product-textarea:focus,
    .feature-input:focus {
        border-color: var(--clr-main);
        outline: none !important;
        box-shadow: none !important;
    }

/* ============================================================
   FEATURE INPUT BUTTONS
============================================================ */
.add-feature-btn,
.add-more-feature {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px dashed rgba(255,255,255,0.35) !important;
    color: rgba(255,255,255,0.85) !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

/* ============================================================
   UPLOAD BOXES
============================================================ */
.upload-box {
    border: 1px dashed rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.03);
    padding: 20px;
    border-radius: 14px;
    position: relative;
}

.upload-input {
    opacity: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.gallery-icon {
    font-size: 2rem;
    color: rgba(255,255,255,0.6);
}

.upload-plus-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px dashed rgba(255,255,255,0.25);
    color: white;
    border-radius: 8px;
}

/* ============================================================
   SAVE / CANCEL BUTTONS
============================================================ */
.cancel-btn {
    padding: 10px 22px;
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    border-radius: 10px;
}

.save-btn {
    padding: 10px 24px;
    background: var(--clr-main);
    color: black;
    border-radius: 10px;
    font-weight: 600;
}

/* ============================================================
   FEATURED THUMBNAIL BUTTON
============================================================ */
.thumb-toggle-btn {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.05);
    border: 1px dashed rgba(255,255,255,0.35);
    border-radius: 12px;
    color: rgba(255,255,255,0.85);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

    .thumb-toggle-btn:hover {
        background: rgba(255,255,255,0.12);
    }

    .thumb-toggle-btn.active {
        background: var(--clr-main);
        border-color: var(--clr-main);
        color: #151515;
    }

/* ============================================================
   REMOVE GREY BACKGROUND FOR CREATE PRODUCT WRAPPER
============================================================ */
.create-card-container {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
}

/* Optional: create-form-scroll spacing tweak */
.page-scroll-area .create-form-scroll {
    padding: 0 !important;
}

.page-scroll-area .col-md-6.ps-4 {
    padding-right: 32px !important;
}

.page-scroll-area .upload-box {
    margin-right: 12px !important;
}

/* Main container spacing */
.thumb-wrapper {
    width: 100%;
    border: 2px dashed #ffffff33;
    border-radius: 12px;
    padding: 25px 25px 70px 25px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    position: relative;
    transition: 0.3s;
    min-height: 270px;
    margin-bottom: 40px;
}

/* Bigger centered icon */
.large-thumb-icon {
    font-size: 110px;
    color: white;
}

.thumb-placeholder-center {
    position: absolute;
    top: 35px;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
}

/* Bottom bar */
.thumb-bottom-bar {
    position: absolute;
    bottom: 15px;
    left: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.13);
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.thumb-label {
    color: white;
    font-size: 15px;
    font-weight: 500;
}

.thumb-add-button {
    background: var(--clr-main);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: black;
}

/* Preview grid exactly aligns with width */
.thumb-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.thumb-item-box {
    position: relative;
    margin-bottom: 10px !important;
}

.thumb-img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--clr-main);
}

.thumb-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: red;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    line-height: 18px;
    padding: 0;
}

.feature-add-btn,
.feature-remove-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px dashed rgba(255,255,255,0.35) !important;
    border-radius: 10px !important;
    padding: 0 !important;
    line-height: 1 !important;
}

    .feature-remove-btn i {
        font-size: 18px !important;
    }

    .feature-remove-btn:hover {
        background: rgba(255,255,255,0.15) !important;
        border-color: var(--clr-main) !important;
    }

.add-more-feature {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px dashed rgba(255,255,255,0.35) !important;
    color: rgba(255,255,255,0.85) !important;
    padding: 0 !important;
    line-height: 1 !important;
}

    .add-more-feature i {
        font-size: 20px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

/* Shorter gallery wrapper */
.gallery-wrapper {
    border: 2px dashed #ffffff33;
    border-radius: 12px;
    padding: 15px 20px 60px 20px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    transition: 0.3s;
    min-height: 150px;
}

/* Placeholder row (4 icons) */
.gallery-placeholder-row {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    padding-left: 5px;
    padding-top: 5px;
    margin-bottom: 18px;
}

.gallery-placeholder-icon {
    font-size: 45px;
    color: #ffffffcc;
}

/* When previews exist, hide placeholder row */
#galleryPreview.d-none + .thumb-bottom-bar {
    margin-top: 0;
}

/* Prevent input boxes from turning white when typing */
input.product-input,
textarea.product-textarea,
input.feature-input {
    background-color: rgba(255,255,255,0.04) !important;
    color: white !important;
    caret-color: var(--clr-main) !important;
}

    input.product-input:focus,
    textarea.product-textarea:focus,
    input.feature-input:focus {
        background-color: rgba(255,255,255,0.06) !important;
        color: white !important;
        border-color: var(--clr-main) !important;
        box-shadow: none !important;
    }

/* Clean video wrapper, no icon */
.video-wrapper {
    border: 2px dashed #ffffff33;
    border-radius: 12px;
    padding: 15px 20px 60px 20px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    min-height: 90px;
}

.video-preview-box {
    margin-bottom: 18px !important;
}

    .video-preview-box video {
        width: 100%;
        max-height: 240px;
        border-radius: 12px;
        border: 2px solid var(--clr-main);
        object-fit: cover;
        margin-bottom: 8px;
    }

.video-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: red;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    line-height: 18px;
    padding: 0;
}

/* Prevent overlapping between thumbnail preview and gallery preview */
#thumbPreview,
#galleryPreview {
    margin-bottom: 20px !important;
}

/* UNIVERSAL SMALL BUTTON STYLE (matches star button) */
.thumb-add-button,
.feature-remove-btn,
.add-more-feature {
    background: rgba(255,255,255,0.05) !important;
    border: 1px dashed rgba(255,255,255,0.35) !important;
    color: rgba(255,255,255,0.85) !important;
    border-radius: 10px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    transition: 0.2s ease-in-out !important;
}

    .thumb-add-button:hover,
    .feature-remove-btn:hover,
    .add-more-feature:hover {
        background: rgba(255,255,255,0.15) !important;
        border-color: var(--clr-main) !important;
    }

.add-feature-wrapper {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    margin-top: 12px;
}

/* ============================================================
   PRODUCT CARD FIXES — THUMBNAILS INSIDE CARD
============================================================ */

/* Thumbnails overlay bottom-left INSIDE card */
.aero-thumb-overlay {
    position: absolute !important;
    bottom: 14px !important;
    left: 14px !important;
    display: flex !important;
    gap: 8px !important;
    z-index: 120 !important; /* above overlay */
}

.aero-thumb {
    width: 58px !important;
    height: 58px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    transition: transform .2s ease, border-color .2s ease !important;
}

    .aero-thumb:hover {
        transform: scale(1.08) !important;
        border-color: var(--clr-main) !important;
    }

/* dark overlay should sit below thumbnails but above image */
.aero-product-overlay {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    z-index: 80 !important; /* BELOW thumbnails */
}

.aero-product-actions {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: auto !important;
    transition: 0.3s ease !important;
}

.aero-product-card:hover .aero-product-actions {
    opacity: 1 !important;
    visibility: visible !important;
}
/* ============================================================
   PRODUCT CARD — FINAL CLEAN VERSION (NO BLACK GAP)
============================================================ */

.aero-product-card {
    position: relative;
    width: 100%;
    height: 350px; /* fixed height = no stretching */
    border-radius: 16px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 16px 35px rgba(0,0,0,0.55);
    isolation: isolate;
}


/* Image wrapper fills full vertical space */
.aero-image-wrapper {
    width: 100%;
    height: 100%; /* force it to match card height */
    overflow: hidden;
    position: relative;
}


/* Product image */
.aero-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center;
    transition: transform 0.35s ease;
}

/* Hover: zoom only (no brightness bug) */
.aero-product-card:hover .aero-product-image {
    transform: scale(1.12);
}

/* ============================================================
   DARK HOVER OVERLAY (FIX FOR DARK STRIP)
============================================================ */

.aero-product-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 80;
}

    /* Smooth dark shading layer */
    .aero-product-overlay::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0);
        transition: background 0.35s ease;
        z-index: -1;
    }

/* Hover: fade in overlay */
.aero-product-card:hover .aero-product-overlay::before {
    background: rgba(0,0,0,0.55);
}

/* ============================================================
   HOVER BUTTONS (Edit / Delete)
============================================================ */

.aero-product-actions {
    opacity: 0;
    visibility: hidden;
    display: inline-flex;
    gap: 12px;
    transition: 0.3s ease;
    pointer-events: auto;
}

.aero-product-card:hover .aero-product-actions {
    opacity: 1;
    visibility: visible;
}

.aero-btn-primary {
    background: #ffbd59;
    color: #151515;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    border: none;
}

.aero-btn-ghost {
    background: transparent;
    color: #f7f7f7;
    border-radius: 12px;
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.35);
}

/* ============================================================
   THUMBNAILS (Inside Card)
============================================================ */

.aero-thumb-overlay {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
    z-index: 120;
}

.aero-thumb {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .2s ease, border-color .2s ease;
}

    .aero-thumb:hover {
        transform: scale(1.08);
        border-color: var(--clr-main);
    }
.aero-product-card {
    height: 350px;
    overflow: hidden;
    position: relative;
    background: transparent !important; /* REMOVE BLACK */
}

.aero-image-wrapper {
    height: 100% !important; /* FORCE FULL HEIGHT */
}

.aero-product-image {
    height: 100% !important;
    object-fit: cover !important;
}
/* Force the image wrapper to match the card height */
.aero-product-card {
    height: 350px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
}

/* Image wrapper MUST expand to full height */
.aero-image-wrapper {
    height: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Image fills entire container (ZOOM IN if needed) */
.aero-product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* crucial */
    object-position: center !important;
    display: block !important;
}
/* ============================================
   FINAL FIX — PRODUCT CARD / IMAGE SIZING
   (Place at the VERY BOTTOM of your CSS file)
=============================================== */

.aero-product-card {
    height: 350px !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    display: block !important;
}

.aero-image-wrapper {
    height: 350px !important; /* ← THIS IS THE REAL FIX */
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    display: block !important;
}

.aero-product-image {
    width: 100% !important;
    height: 350px !important; /* ← FORCE IMAGE HEIGHT */
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}
