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

body {
    background-color: #FEF3E7;
    font-family: "Poppins", sans-serif;
    margin: 0;
    padding: 0;
}

nav {
    margin-bottom: 20px;
}

.nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: darkslateblue;
}

.container {
    display: flex;
    width: 90%;
    max-width: 1400px;
    margin: 40px auto;
    justify-content: center;
    align-items: center;
    gap: 150px;
    padding: 0;
}

.left-section,
.right-section {
    width: 45%;
    max-width: 500px;
    height: 500px;
    border-radius: 25px;
}


.products {
    max-width: 500px;
    height: 500px;
    border-radius: 25px;
}

.container h1 {
    font-size: clamp(16px, 4vw, 30px);
    margin: 0 0 10px;
}

.container button,
.btn-primary {
    background-color: #F8BED7;
    border-radius: 25px;
    height: 40px;
    width: 200px;
    margin: 40px 0 30px;
    color: #EB1E1E;
    border: none;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
    margin: 0;
}

.container button:hover,
.btn-primary:hover {
    background-color: #f5a8c9;
    transform: translateY(-2px);
}

/* Hero actions on the home page */
.button-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin: 40px 0 30px;
}

.button-container button,
.button-container .btn-primary {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.button-container .hero-btn {
    color: #EB1E1E !important;
}

.button-container .hero-btn:hover {
    color: #EB1E1E !important;
    text-decoration: none;
}

h1 {
    color: #EB1E1E;
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    margin: 40px 0 30px;
    line-height: 1;
    letter-spacing: -2px;
}

p {
    color: #444;
    font-size: 18px;
    line-height: 1.8;
    margin: 0 0 25px;
}

a,
nav h2 {
    color: black !important;
    font-weight: 600 !important;
}



.footer {
    background-color: #F8BED7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 60px 20px;
    text-align: center;
}

.footer h1 {
    font-size: clamp(16px, 4vw, 30px);
    text-align: center;
    margin: 0 0 10px;
}

.footer .social-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.footer .social-icons button {
    background: white;
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #EB1E1E;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.footer .social-icons button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.footer .social-icons svg {
    width: 26px;
    height: 26px;
}

a:hover {
    color: red;
    background-color: transparent;
    text-decoration: underline;
}

img {
    display: block;
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

.controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 12px;
}

.highlight {
    background-color: yellow;
    color: darkslateblue;
}

.faded {
    opacity: 0.3;
}

.zoom {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);

    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #F5DFE8;
    padding: 35px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.modal-content h2 {
    color: #EB1E1E;
    font-size: clamp(24px, 6vw, 10px);
    font-weight: 600;
    font-style: normal;
    text-align: left;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-content input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.modal-content button {
    background-color: #EB1E1E;
    color: #fff;
    border: none;
    border-radius: 25px;
    height: 40px;
    width: 200px;
    margin: 40px 0 30px;
    cursor: pointer;
    align-self: center;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
}

.error-message {
    color: #EB1E1E;
    font-size: 14px;
    margin: 0 0 10px;
    text-align: center;
}

.nav-auth-btn {
    background-color: #F8BED7;
    color: #EB1E1E;
    border: none;
    border-radius: 25px;
    padding: 8px 18px;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.nav-auth-btn:hover {
    background-color: #f5a8c9;
    transform: translateY(-2px);
}

.nav-user {
    color: #444;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Edit / Delete buttons inside a product card */
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-sm {
    width: auto;
    min-width: 90px;
    height: 34px;
    margin: 0;
    padding: 0 16px;
    font-size: 14px;
}

/* Image shown at the top of each product card */
.product-card-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    background-color: #F5DFE8;
}

/* Image picker inside the product modal */
.image-hint {
    font-size: 12px;
    line-height: 1.4;
    color: #8a6b7c;
    margin: -4px 0 0;
}

.product-image-preview {
    display: none;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e3cbd6;
}

/* Floating assistant bubble */
.chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    font-family: "Poppins", sans-serif;
}

.chat-toggle {
    width: 64px;
    height: 64px;
    padding: 0;
    border-radius: 50%;
    border: 3px solid red;
    overflow: hidden;
    cursor: pointer;
    background: #F8BED7;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-toggle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-toggle:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.chat-panel {
    display: none;
    position: absolute;
    right: 0;
    bottom: 80px;
    width: min(360px, calc(100vw - 32px));
    height: min(480px, calc(100vh - 140px));
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    flex-direction: column;
}

.chat-panel.open {
    display: flex;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #F8BED7;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    color: #EB1E1E;
}

.chat-header p {
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
    color: #6b4a4a;
}

.chat-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.chat-header-text {
    flex: 1;
    min-width: 0;
}

.chat-close {
    background: none;
    border: none;
    padding: 0 4px;
    font-size: 24px;
    line-height: 1;
    color: #EB1E1E;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    overflow-y: auto;
    background: #FEF3E7;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-msg.bot {
    align-self: flex-start;
    background: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chat-msg.user {
    align-self: flex-end;
    background: #EB1E1E;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid #f0e3e3;
}

.chat-form input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid #e3cbd6;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.chat-form input:focus {
    border-color: #EB1E1E;
}

.chat-form button {
    border: none;
    border-radius: 999px;
    padding: 0 18px;
    background: #EB1E1E;
    color: #fff;
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.chat-form button:disabled,
.chat-form input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chat-typing {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c98ba8;
    animation: chat-blink 1.2s infinite ease-in-out;
}

.chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chat-blink {

    0%,
    80%,
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

@media (max-width: 480px) {
    .chat-widget {
        right: 16px;
        bottom: 16px;
    }

    .chat-panel {
        bottom: 76px;
    }
}
/* Add-to-cart feedback toast */
.shop-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    background: #EB1E1E;
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1100;
    max-width: calc(100vw - 32px);
    text-align: center;
}

.shop-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.shop-toast.error {
    background: #7a1f1f;
}

/* Bag icon + item count in the header */
.nav-cart {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #EB1E1E;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #FEF3E7;
}

/* Cart page */
.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 24px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(235, 30, 30, 0.07);
}

.cart-item-img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    background: #F5DFE8;
}

.cart-item-info h3 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #333;
}

.cart-item-price {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.3;
    color: #8a6b7c;
}

.cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 3px;
    border-radius: 999px;
    background: #FEF3E7;
}

.cart-qty-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #F8BED7;
    color: #EB1E1E;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cart-qty-btn:hover:not(:disabled) {
    background: #f5a8c9;
}

.cart-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cart-qty-value {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    color: #444;
}

.cart-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.cart-item-subtotal {
    color: #EB1E1E;
    font-size: 18px;
}

.cart-remove {
    padding: 0;
    border: none;
    background: none;
    color: #8a6b7c;
    font-family: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.cart-remove:hover {
    color: #EB1E1E;
}

.cart-summary {
    position: sticky;
    top: 20px;
    padding: 22px;
    border-radius: 18px;
    background: #F5DFE8;
}

.cart-summary:empty {
    display: none;
}

.cart-summary h2 {
    margin: 0 0 16px;
    font-size: 20px;
    color: #EB1E1E;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 15px;
    color: #555;
}

.summary-total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid #e3cbd6;
    font-size: 17px;
    color: #333;
}

.summary-total strong {
    color: #EB1E1E;
    font-size: 22px;
}

.btn-secondary {
    width: 100%;
    height: 42px;
    margin: 16px 0 8px;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: #EB1E1E;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background: #fdf0f6;
}

.cart-continue {
    display: block;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #EB1E1E !important;
}

.cart-empty {
    padding: 44px 24px;
    border-radius: 18px;
    background: #fff;
    text-align: center;
    box-shadow: 0 6px 18px rgba(235, 30, 30, 0.07);
}

.cart-empty h2 {
    margin: 0 0 8px;
    color: #EB1E1E;
    font-size: 24px;
}

.cart-empty p {
    max-width: 420px;
    margin: 0 auto 20px;
    font-size: 15px;
}

.cart-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 40px;
    padding: 0 28px;
    border-radius: 999px;
    font-weight: 600;
    color: #EB1E1E !important;
    text-decoration: none;
}

.cart-link-btn:hover {
    text-decoration: none;
}

.cart-muted {
    font-size: 15px;
    color: #8a6b7c;
}

.cart-status {
    display: none;
    margin: 0 0 18px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
}

.cart-status.error {
    display: block;
    background: #fdeaea;
    color: #a12020;
    border: 1px solid #f3c7c7;
}

.cart-status.success {
    display: block;
    background: #eafaf0;
    color: #1f7a45;
    border: 1px solid #c5eed7;
}

.cart-items.busy,
.cart-summary.busy {
    opacity: 0.55;
    pointer-events: none;
}

.product-price {
    margin: 0 0 4px;
    color: #EB1E1E;
    font-size: 16px;
    font-weight: 600;
}

.product-stock {
    margin: 0;
    color: #8a6b7c;
    font-size: 13px;
}

@media (max-width: 760px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 560px) {
    .cart-item {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .cart-item-img {
        width: 72px;
        height: 72px;
    }

    .cart-item-side {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
