/* =====================================================
   RESET
===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: Arial, Helvetica, sans-serif;
    background: #EAF4FF;
    color: #0B1F3A;
    overflow-x: hidden;
}
button,
input,
select,
textarea {
    font: inherit;
}
button {
    cursor: pointer;
    border: none;
}
/* =====================================================
   12 COLUMN GRID
===================================================== */
.container {
    width: 92%;
    max-width: 1400px;
    margin: auto;
    display: grid;
    grid-template-columns:
        repeat(12, 1fr);
    gap: 20px;
}
/* =====================================================
   ANNOUNCEMENT
===================================================== */
.announcement {
    height: 40px;
    background: #0B1F3A;
    color: #FFFFFF;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.announcement-track {
    white-space: nowrap;
    animation:
        announcementMove 20s linear infinite;
}
.announcement-track span {
    margin: 0 45px;
    font-size: 14px;
    font-weight: bold;
}
@keyframes announcementMove {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}
/* =====================================================
   HEADER
===================================================== */
.header {
    background: #0B1F3A;
    color: #FFFFFF;
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo {
    grid-column: span 2;
    display: flex;
    align-items: center;
    font-size: 27px;
    font-weight: bold;
}
.logo span {
    color: #60A5FA;
}
.search-box {
    grid-column: span 6;
    display: flex;
    align-items: center;
}
.search-box input {
    width: 100%;
    padding: 13px 20px;
    border-radius: 30px;
    border: none;
    outline: none;
}
.header-actions {
    grid-column: span 4;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.header-btn {
    background: #0B1F3A;
    color: #FFFFFF;
    padding: 11px 17px;
    border-radius: 25px;
    transition: .3s;
}
.header-btn:hover {
    background: #2563EB;
    color: #FFFFFF;
    transform: translateY(-2px);
}
/* =====================================================
   HERO
===================================================== */
.hero {
    grid-column: span 12;
    margin-top: 30px;
    min-height: 270px;
    border-radius: 25px;
    padding: 45px;
    display: grid;
    grid-template-columns:
        repeat(12, 1fr);
    align-items: center;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            rgba(7,91,216,.97),
            rgba(7,91,216,.82)
        ),
        url(
        "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?auto=format&fit=crop&w=1400&q=80"
        );
    background-size: cover;
    background-position: center;
    color: white;
}
.hero::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background:
        rgba(96,165,250,.2);
    right: 10%;
    top: 20%;
    animation:
        floatingCircle 5s ease-in-out infinite;
}
@keyframes floatingCircle {
    0%,100% {
        transform:
            translateY(0)
            scale(1);
    }
    50% {
        transform:
            translateY(-30px)
            scale(1.15);
    }
}
.hero-content {
    grid-column: span 7;
    position: relative;
    z-index: 2;
    animation:
        heroText 1s ease;
}
@keyframes heroText {
    from {
        opacity: 0;
        transform:
            translateY(30px);
    }
    to {
        opacity: 1;
        transform:
            translateY(0);
    }
}
.hero h1 {
    font-size:
        clamp(40px,5vw,68px);
    margin-bottom: 15px;
}
.hero p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #dbeafe;
}
.shop-btn {
    background: #2563EB;
    color: #FFFFFF;
    padding: 14px 27px;
    border-radius: 30px;
    font-weight: bold;
}
/* =====================================================
   CATEGORIES
===================================================== */
.category-section {
    grid-column: span 12;
    margin-top: 25px;
}
.category-toggle {
    background: #0B1F3A;
    color: #60A5FA;
    padding: 13px 22px;
    border-radius: 25px;
    font-weight: bold;
}
.categories {
    display: none;
    margin-top: 15px;
    grid-template-columns:
        repeat(auto-fit,minmax(130px,1fr));
    gap: 10px;
}
.categories.show {
    display: grid;
}
.category {
    background: white;
    padding: 12px;
    border-radius: 15px;
    transition: .3s;
}
.category:hover {
    background: #2563EB;
    color: #FFFFFF;
}
/* =====================================================
   PRODUCTS
===================================================== */
.products-header {
    grid-column: span 12;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.products-header h2 {
    font-size: 30px;
}
.page-info {
    background: white;
    padding: 9px 15px;
    border-radius: 20px;
    font-size: 14px;
}
.product-page {
    grid-column: span 12;
    display: grid;
    grid-template-columns:
        repeat(3,minmax(0,1fr));
    gap: 20px;
    touch-action: pan-y;
}
/* =====================================================
   PRODUCT CARD
===================================================== */
.product {
    background: white;
    border-radius: 18px;
    padding: 18px;
    overflow: hidden;
    box-shadow:
        0 10px 30px
        rgba(7,27,54,.12);
    transition:
        transform .3s,
        box-shadow .3s;
}
.product:hover {
    transform:
        translateY(-7px);
    box-shadow:
        0 18px 40px
        rgba(7,27,54,.18);
}
.product-image {
    height: 250px;
    background: #eff6ff;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    perspective: 800px;
    cursor: pointer;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform .9s ease;
}
/* ONLY IMAGE ROTATES */
.product:hover
.product-image img {
    transform:
        perspective(800px)
        rotateY(360deg)
        scale(1.08);
}
.product-image.rotate img {
    transform:
        perspective(800px)
        rotateY(360deg)
        scale(1.08);
}
.product-info {
    padding: 16px 3px 3px;
}
.badge {
    display: inline-block;
    background: #dbeafe;
    color: #2563eb;
    padding: 5px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 8px;
}
.product h3 {
    font-size: 20px;
    margin-bottom: 8px;
}
.product-seller {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    margin: 8px 0;
}
.description {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
    min-height: 38px;
}
.rating {
    color: #2563EB;
    margin: 9px 0;
}
.price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin:
        8px 0 13px;
}
.current-price {
    font-size: 20px;
    font-weight: bold;
}
.old-price {
    color: #94a3b8;
    text-decoration:
        line-through;
    font-size: 13px;
}
.add-cart {
    width: 100%;
    min-height: 46px;
    padding: 12px;
    background: #0B1F3A;
    color: #FFFFFF;
    border-radius: 13px;
    font-weight: bold;
}
.add-cart:hover {
    background: #2563EB;
    color: #FFFFFF;
}
.product-actions {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}
.chat-seller-btn {
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid #2563EB;
    border-radius: 13px;
    background: #EFF6FF;
    color: #0751B8;
    font-size: 14px;
    font-weight: 800;
}
.chat-seller-btn:hover {
    background: #DBEAFE;
}
@media (min-width:701px) and (max-width:1000px) {
    .product-page {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}
/* =====================================================
   SWIPE ANIMATION
===================================================== */
.product-page.slide-left {
    animation:
        slideLeft .45s ease;
}
.product-page.slide-right {
    animation:
        slideRight .45s ease;
}
@keyframes slideLeft {
    from {
        opacity: 0;
        transform:
            translateX(70px);
    }
    to {
        opacity: 1;
        transform:
            translateX(0);
    }
}
@keyframes slideRight {
    from {
        opacity: 0;
        transform:
            translateX(-70px);
    }
    to {
        opacity: 1;
        transform:
            translateX(0);
    }
}
/* =====================================================
   PAGINATION
===================================================== */
.swipe-message {
    grid-column: span 12;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}
.pagination {
    grid-column: span 12;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin:
        25px 0 60px;
}
.page-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: white;
    font-weight: bold;
}
.page-btn.active {
    background: #2563EB;
    color: #FFFFFF;
}
.arrow-btn {
    background: #0B1F3A;
    color: #FFFFFF;
    padding: 10px 16px;
    border-radius: 20px;
}
/* =====================================================
   INVITATION
===================================================== */
.invitation {
    grid-column: span 12;
    background:
        linear-gradient(
            135deg,
            #0B1F3A,
            #173E6B
        );
    color: white;
    padding: 45px;
    border-radius: 25px;
    text-align: center;
    margin-bottom: 40px;
    overflow: hidden;
    position: relative;
}
.invitation h2 {
    font-size: 32px;
    margin-bottom: 12px;
}
.invitation p {
    color: #dbeafe;
    margin-bottom: 22px;
}
.email-form {
    display: flex;
    max-width: 550px;
    margin: auto;
}
.email-form input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    outline: none;
    border-radius:
        30px 0 0 30px;
}
.email-form button {
    padding: 14px 22px;
    background: #2563EB;
    color: #FFFFFF;
    font-weight: bold;
    border-radius:
        0 30px 30px 0;
}
/* =====================================================
   FOOTER
===================================================== */
.footer {
    background: #0B1F3A;
    color: #FFFFFF;
    padding:
        50px 0 20px;
}
.footer-grid {
    width: 92%;
    max-width: 1400px;
    margin: auto;
    display: grid;
    grid-template-columns:
        repeat(12,1fr);
    gap: 30px;
}
.footer-column {
    grid-column: span 3;
}
.footer-column h3 {
    color: #60a5fa;
    margin-bottom: 15px;
}
.footer-column p {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 14px;
}
.footer-column ul {
    list-style: none;
}
.footer-column li {
    margin-bottom: 10px;
    color: #cbd5e1;
    cursor: pointer;
}
.footer-column li:hover {
    color: #60a5fa;
}
.footer-bottom {
    width: 92%;
    max-width: 1400px;
    margin: 35px auto 0;
    padding-top: 20px;
    border-top:
        1px solid
        rgba(255,255,255,.12);
    text-align: center;
    color: #94a3b8;
}
/* =====================================================
   MODAL
===================================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background:
        rgba(7,27,54,.75);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal.show {
    display: flex;
}
.modal-box {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    padding: 30px;
    border-radius: 25px;
    position: relative;
    animation:
        modalIn .3s ease;
}
@keyframes modalIn {
    from {
        opacity: 0;
        transform:
            scale(.8);
    }
    to {
        opacity: 1;
        transform:
            scale(1);
    }
}
.close {
    position: absolute;
    right: 18px;
    top: 15px;
    font-size: 25px;
    background: none;
}
.seller-chat-box {
    max-width: 560px;
    border-radius: 16px;
}
.seller-chat-box h2 {
    padding-right: 28px;
    margin-bottom: 5px;
    color: #0B1F3A;
}
.seller-chat-product {
    margin: 0 0 14px;
    color: #52657A;
    font-size: 13px;
}
.seller-chat-location {
    padding: 13px 15px;
    border: 1px solid #CFE2F5;
    border-radius: 10px;
    background: #EFF6FF;
}
.seller-chat-location strong {
    display: block;
    margin-bottom: 4px;
    color: #0751B8;
    font-size: 12px;
}
.seller-chat-location p {
    margin: 0;
    color: #1E293B;
    font-size: 14px;
}
.seller-chat-map {
    display: inline-block;
    margin-top: 7px;
    color: #075BD8;
    font-size: 13px;
    font-weight: 700;
}
.seller-chat-thread {
    display: grid;
    gap: 9px;
    max-height: 250px;
    min-height: 100px;
    margin: 14px 0;
    overflow-y: auto;
}
.seller-chat-empty,
#sellerChatThread:not(:has(.seller-chat-message)) {
    color: #64748B;
    font-size: 13px;
}
.seller-chat-message {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 10px;
    background: #F1F5F9;
}
.seller-chat-message.outgoing {
    justify-self: end;
    background: #DBEAFE;
}
.seller-chat-message strong {
    color: #0B1F3A;
    font-size: 11px;
}
.seller-chat-message p {
    margin: 4px 0 0;
    color: #1E293B;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.seller-chat-form label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}
.seller-chat-form textarea {
    width: 100%;
    min-height: 90px;
    padding: 11px;
    border: 1px solid #CBD5E1;
    border-radius: 9px;
    resize: vertical;
}
.seller-chat-login {
    display: inline-block;
    margin-top: 10px;
    color: #075BD8;
    font-size: 13px;
    font-weight: 700;
}
.modal h2 {
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border:
        1px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
}
.submit-btn {
    width: 100%;
    background: #2563eb;
    color: white;
    padding: 13px;
    border-radius: 12px;
    font-weight: bold;
}
.switch {
    text-align: center;
    margin-top: 15px;
    color: #64748b;
}
.switch button {
    background: none;
    color: #2563eb;
    font-weight: bold;
}
.message {
    display: none;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 10px;
    background: #dbeafe;
    font-size: 13px;
}
.logout-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    background: #071b36;
    color: white;
}
/* =====================================================
   ADMIN PANEL
===================================================== */
.admin-panel {
    display: none;
    margin-top: 15px;
}
.admin-panel.show {
    display: block;
}
.admin-section {
    background: #f8fafc;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
}
.admin-section h3 {
    margin-bottom: 12px;
}
.admin-item {
    background: white;
    border:
        1px solid #e2e8f0;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.admin-item button {
    background: #ef4444;
    color: white;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
}
.admin-item button.unblock {
    background: #16a34a;
}
/* =====================================================
   SELLER DASHBOARD
===================================================== */
.seller-panel {
    display: none;
    margin-top: 15px;
}
.seller-panel.show {
    display: block;
}
.dashboard-button {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    border-radius: 12px;
    margin-bottom: 10px;
}
/* =====================================================
   CART
===================================================== */
.cart-items {
    max-height: 350px;
    overflow-y: auto;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom:
        1px solid #e2e8f0;
}
.cart-total {
    margin-top: 20px;
    font-size: 20px;
    font-weight: bold;
    text-align: right;
}
/* =====================================================
   MOBILE
===================================================== */
@media (max-width:700px) {
    .container {
        width: 94%;
        gap: 12px;
    }
    .logo {
        grid-column: span 12;
        justify-content: center;
    }
    .search-box {
        grid-column: span 12;
    }
    .header-actions {
        grid-column: span 12;
        justify-content: center;
    }
    .hero {
        padding: 24px 20px;
        min-height: 235px;
    }
    .hero-content {
        grid-column: span 12;
    }
    .hero h1 {
        font-size: 40px;
    }
    /* ============================================
       2 X 2 PRODUCTS
    ============================================ */
    .product-page {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
        gap: 10px;
    }
    .product {
        padding: 10px;
        border-radius: 16px;
    }
    .product-image {
        height: 165px;
        border-radius: 13px;
    }
    .product h3 {
        font-size: 14px;
    }
    .description {
        font-size: 11px;
        min-height: 32px;
    }
    .rating {
        font-size: 11px;
    }
    .current-price {
        font-size: 16px;
    }
    .old-price {
        font-size: 10px;
    }
    .add-cart {
        padding: 10px 5px;
        font-size: 12px;
    }
    .chat-seller-btn {
        padding: 10px 5px;
        font-size: 12px;
    }
    .invitation {
        padding: 30px 18px;
    }
    .invitation h2 {
        font-size: 25px;
    }
    .email-form {
        flex-direction: column;
        gap: 8px;
    }
    .email-form input,
    .email-form button {
        border-radius: 25px;
    }
    .footer-column {
        grid-column: span 6;
    }
}
/* VERY SMALL PHONES */
@media (max-width:420px) {
    .product-image {
        height: 125px;
    }
    .description {
        display: none;
    }
    .footer-column {
        grid-column: span 12;
        text-align: center;
    }
}

/* =====================================================
   IMAGE LIGHTBOX - click a product photo to enlarge it
===================================================== */
.image-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 27, 54, .88);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.image-lightbox.show {
    display: flex;
}
.image-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.image-lightbox .close {
    position: absolute;
    top: 20px;
    right: 28px;
    color: white;
    font-size: 38px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}
