/* -------------------------------------------------------
   ECOMM-SQUARED MAIN THEME
   Black & White, Squared, Mobile-first
-------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-main: #050505;
    --bg-alt: #0f0f10;
    --bg-card: #111214;
    --bg-soft: #18191b;

    --border-soft: #2a2b2e;
    --border-strong: #ffffff;

    --text-main: #ffffff;
    --text-muted: #a6a7aa;
    --text-soft: #7b7c80;
    --accent: #ffffff;
    --accent-soft: #f3f3f3;

    --radius-card: 14px;
    --radius-btn: 12px;

    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.45);

    --transition-fast: 0.2s ease;
    --transition-med: 0.3s ease;

    --font-main: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
}

/* Global */

body.squared-theme {
    background: radial-gradient(circle at top left, #1a1a1d 0, #050505 55%);
    min-height: 100vh;
}

.page-wrapper {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* Links & Buttons */

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    opacity: 0.85;
}

button {
    font-family: inherit;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    border-radius: var(--radius-btn);
    border: 1px solid #ffffff;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), transform 0.1s ease;
}

.btn-primary:hover {
    background: #000000;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border-radius: var(--radius-btn);
    border: 1px solid var(--border-soft);
    padding: 9px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--accent-soft);
    color: #000000;
    border-color: #ffffff;
}

.full {
    width: 100%;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 28px 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

/* -------------------- TOP BAR -------------------- */

.top-bar {
    width: 100%;
    padding: 6px 16px;
    background: #111216;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-soft);
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.top-bar-left strong {
    color: #ffffff;
}

/* .top-bar-right strong {
    color: #ffffff;
} */

/* -------------------- NAVBAR -------------------- */

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(8, 8, 10, 0.96);
    -webkit-backdrop-filter: blur(18px);

    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.nav-left .logo img {
    height: 30px;
    width: auto;
    display: block;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-soft);
    padding-bottom: 2px;
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1.5px;
    background: #ffffff;
    transition: width var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 130%;
    left: 0;
    background: #0d0d10;
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    padding: 8px 0;
    min-width: 170px;
    border: 1px solid var(--border-soft);
    z-index: 15;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 8px 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dropdown-menu a:hover {
    background: #16171a;
    color: #ffffff;
}

/* Nav right */

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    background: #101015;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.icon-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-1px);
}

.avatar-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    overflow: hidden;
    border: 1px solid #ffffff;
    display: inline-block;
}

.avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-btn {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: var(--radius-btn);
    border: 1px solid #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.13em;
}

.hamburger {
    display: none;
    background: transparent;
    border: 1px solid var(--border-soft);
    border-radius: 9px;
    padding: 5px 7px;
    color: #ffffff;
}

/* -------------------- MOBILE NAV -------------------- */

.mobile-nav {
    position: fixed;
    inset: 0;
    background: rgba(3, 3, 3, 0.96);
    -webkit-backdrop-filter: blur(18px);

    backdrop-filter: blur(18px);
    z-index: 40;
    transform: translateX(100%);
    transition: transform var(--transition-med);
    padding: 16px;
}

.mobile-nav.open {
    transform: translateX(0);
}

.close-mobile-nav {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-link {
    padding: 10px 4px;
    border-bottom: 1px solid #141419;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.mobile-dropdown button {
    width: 100%;
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #141419;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.mobile-dropdown-menu {
    display: none;
    flex-direction: column;
    padding: 4px 0 6px 6px;
}

.mobile-dropdown-menu a {
    font-size: 0.8rem;
    padding: 5px 0;
    color: var(--text-soft);
}

/* -------------------- HERO -------------------- */

.hero {
    position: relative;
    margin-top: 18px;
    border-radius: 22px;
    overflow: hidden;
    background: #111214;
    min-height: 280px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    box-shadow: var(--shadow-soft);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
   
}

.hero-text {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.9)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.07), transparent);
}

.hero-text h1 {
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin: 0 0 8px;
}

.hero-text p {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    background: #ffffff;
    color: #000000;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* -------------------- SMALL BANNER -------------------- */

.small-banner {
    margin-top: 18px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #28292d;
}

.small-banner img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* -------------------- CATEGORIES -------------------- */

.categories-section {
    margin-top: 26px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.category-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 4px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.category-card img {
    width: 98%;
    border-radius: 10px;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.category-card h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: #ffffff;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

/* -------------------- PRODUCTS GRID -------------------- */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 14px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow-soft);
}

.product-thumb {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: #151515;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform var(--transition-med), filter var(--transition-med);
}

.product-card:hover .product-thumb img {
    transform: scale(1.06);
    filter: contrast(1.05);
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 5px;
}

.product-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-main);
    min-height: 2.2em;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.old-price {
    font-size: 0.75rem;
    color: var(--text-soft);
    text-decoration: line-through;
}

.new-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    gap: 6px;
}

.add-to-cart-btn,
.wishlist-btn {
    flex: 1;
    border-radius: 11px;
    border: 1px solid var(--border-soft);
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #101015;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.add-to-cart-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-1px);
}

.wishlist-btn:hover {
    background: #ffffff;
    color: #000000;
}

/* -------------------- LOAD MORE -------------------- */

.load-more-wrap {
    margin-top: 16px;
    text-align: center;
}

.load-more-btn {
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    padding: 8px 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    cursor: pointer;
}

/* -------------------- PRODUCT PAGE -------------------- */

.product-page {
    margin-top: 26px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 20px;
}

.product-images {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 12px;
    border: 1px solid var(--border-soft);
}

.product-images .main-img {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/5;
    margin-bottom: 10px;
}

.product-images .main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-images .thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.product-images .thumbs img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
}

.product-details {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid var(--border-soft);
}

.product-details h1 {
    font-size: 1.4rem;
    margin: 0 0 8px;
}

.price-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.price-block .old {
    text-decoration: line-through;
    color: var(--text-soft);
    font-size: 0.85rem;
}

.price-block .new {
    font-size: 1.1rem;
    font-weight: 600;
}

.size-selector {
    margin-bottom: 12px;
}

.size-selector label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--text-soft);
    margin-bottom: 4px;
}

.sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.size-btn {
    background: #141518;
    border-radius: 9px;
    border: 1px solid var(--border-soft);
    padding: 6px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-main);
}

.size-btn:hover {
    background: #ffffff;
    color: #000000;
}

.add-cart-form {
    margin-bottom: 8px;
}

.product-details .desc {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Reviews */

.reviews-section {
    margin-top: 28px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--border-soft);
}

.reviews-section h2 {
    font-size: 1rem;
    margin-top: 0;
}

.review-card {
    border-top: 1px solid #1c1d20;
    padding: 10px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.review-form textarea {
    width: 100%;
    min-height: 80px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: #101015;
    color: #ffffff;
    padding: 8px;
    font-family: inherit;
    font-size: 0.84rem;
    margin-bottom: 8px;
}

.recommended {
    margin-top: 26px;
}

/* -------------------- CART PAGE -------------------- */

.cart-page {
    margin-top: 24px;
    height: 80vh;
}

.cart-page h1 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.cart-items {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    padding: 10px;
}

.cart-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1.4fr) minmax(0, 0.7fr);
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #191a1e;
}

.cart-row:last-child {
    border-bottom: none;
}

.cart-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border-soft);
}

.cart-info a {
    font-size: 0.86rem;
    display: block;
    margin-bottom: 4px;
}

.cart-qty input[type="number"] {
    width: 60px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: #101015;
    color: #ffffff;
    padding: 3px 6px;
    font-size: 0.8rem;
}

.cart-qty button {
    margin-left: 6px;
    font-size: 0.75rem;
    padding: 4px 8px;
}

.cart-price {
    text-align: right;
    font-size: 0.9rem;
}

.cart-checkout {
    margin-top: 14px;
}
.qty-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: #101015;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.qty-btn:hover {
    background: #fff;
    color: #000;
}

.qty-input {
    width: 45px;
    padding: 4px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: #101015;
    color: #fff;
}

.remove-form {
    margin-top: 6px;
}

.remove-btn {
    background: transparent;
    border: 1px solid #ff3b3b;
    color: #ff3b3b;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    width: 70px;
}

.remove-btn:hover {
    background: #ff3b3b;
    color: #000;
}

.empty-cart-wrapper {
    min-height: calc(100vh - 120px); 
    /* 100vh minus approx navbar + footer height */
    display: flex;
    justify-content: center;
    align-items: flex-start;  /* push image upward */
    padding: 20px 12px;
}

.empty-cart-link {
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: center;
}

.empty-cart-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0.95;
    display: block;
}


/* -------------------- WISHLIST PAGE -------------------- */

.wishlist-page {
    margin-top: 24px;
}

.wishlist-page h1 {
    margin-bottom: 12px;
}

/* -------------------- CHECKOUT PAGE -------------------- */

.checkout-page {
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 18px;
}

.checkout-page h1 {
    margin: 0 0 10px;
}

.checkout-form,
.checkout-summary {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    padding: 14px;
}

.checkout-form label {
    display: block;
    font-size: 0.8rem;
    margin-top: 8px;
    margin-bottom: 3px;
    color: var(--text-soft);
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    border-radius: 11px;
    border: 1px solid var(--border-soft);
    background: #101015;
    color: #ffffff;
    padding: 7px 9px;
    font-size: 0.84rem;
}

.checkout-form textarea {
    min-height: 80px;
    resize: vertical;
}

.wh-info {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.checkout-summary h2 {
    font-size: 0.98rem;
    margin-top: 0;
}

.summary-row,
.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.86rem;
    padding: 4px 0;
}

.summary-total {
    border-top: 1px solid #202127;
    margin-top: 8px;
    padding-top: 8px;
    font-weight: 600;
}

/* -------------------- PROFILE PAGE -------------------- */

.profile-page {
    margin-top: 24px;
}

.profile-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    padding: 16px;
    max-width: 420px;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid #ffffff;
    margin-bottom: 8px;
}

.profile-card h2 {
    margin: 0 0 4px;
}

.profile-card p {
    margin: 0 0 4px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.reward-coins {
    margin-top: 8px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.profile-update label {
    display: block;
    font-size: 0.78rem;
    margin-top: 8px;
    margin-bottom: 3px;
    color: var(--text-soft);
}

.profile-update input[type="text"],
.profile-update input[type="file"] {
    width: 100%;
    border-radius: 11px;
    border: 1px solid var(--border-soft);
    padding: 7px 9px;
    font-size: 0.84rem;
    background: #101015;
    color: #ffffff;
}

.orders-title {
    margin-top: 24px;
    font-size: 1rem;
}

.orders-list {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.order-item {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    padding: 10px;
    font-size: 0.85rem;
}

/* -------------------- AUTH PAGES -------------------- */

.auth-page {
    margin-top: 40px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    background: var(--bg-card);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    padding: 18px;
    box-shadow: var(--shadow-soft);
}

.auth-page h1 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 14px;
}

.auth-form label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 3px;
    color: var(--text-soft);
}

.auth-form input {
    width: 100%;
    border-radius: 11px;
    border: 1px solid var(--border-soft);
    padding: 8px 9px;
    background: #101015;
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.auth-alt {
    font-size: 0.78rem;
    margin-top: 10px;
    color: var(--text-muted);
}

.auth-alt a {
    text-decoration: underline;
}

/* -------------------- CATEGORY / SHOP HEADERS -------------------- */

.category-header,
.shop-header {
    margin-top: 24px;
    margin-bottom: 10px;
}

.category-header h1,
.shop-header h1 {
    font-size: 1.2rem;
}

/* -------------------- FOOTER -------------------- */

.footer {
    margin-top: 40px;
    border-top: 1px solid var(--border-soft);
    padding: 18px 16px 26px;
    background: #050506;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.footer-col h3 {
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #ffffff;
}

.footer-col a {
    display: block;
    margin: 2px 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.socials i {
    margin-right: 8px;
    font-size: 1rem;
}

.copy {
    margin-top: 14px;
    font-size: 0.75rem;
    text-align: center;
    color: var(--text-soft);
}

/* Flash messages placeholder (alerts.php) */

.alert-success,
.alert-error {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin: 8px 0;
}

.alert-success {
    background: #10351a;
    border: 1px solid #2ee05d;
    color: #8bffb2;
}

.alert-error {
    background: #3a1414;
    border: 1px solid #ff3b3b;
    color: #ffb3b3;
}
