
/* ==========================================
   LITTLE PRINCESS - BABY FASHION WEBSITE
   COMPLETE CSS - DAY 1 TO DAY 11
========================================== */


/* ==========================================
   1. UNIVERSAL SETTINGS
========================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

[hidden] {
    display: none !important;
}


/* ==========================================
   2. WEBSITE BODY
========================================== */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #fff0f5;
    color: #333333;
    line-height: 1.6;
}


/* ==========================================
   3. WEBSITE HEADER
========================================== */

header {
    background-color: #fce4ec;
    text-align: center;
    padding: 25px 20px;
}

header h1 {
    color: #ad1457;
    font-family: Georgia, serif;
    font-size: clamp(28px, 5vw, 42px);
    margin: 0;
}

header p {
    color: #ad1457;
    font-size: 16px;
    margin: 8px 0 20px;
}


/* ==========================================
   4. NAVIGATION MENU
========================================== */

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;

    background-color: #ad1457;
    padding: 15px;
    border-radius: 10px;
}

nav a {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    padding: 8px;
}

nav a:hover {
    text-decoration: underline;
}


/* ==========================================
   5. MAIN WEBSITE CONTENT
========================================== */

main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

section {
    margin-bottom: 40px;
}

section h2 {
    color: #ad1457;
    text-align: center;
    font-size: 26px;
    margin-bottom: 25px;
}


/* ==========================================
   6. WELCOME SECTION
========================================== */

#home {
    background-color: #fce4ec;
    padding: 45px 20px;
    text-align: center;
    border-radius: 15px;
}

#home h2 {
    font-size: clamp(22px, 4vw, 32px);
    margin-top: 0;
    margin-bottom: 15px;
}

#home p {
    color: #555555;
    font-size: 16px;
}


/* ==========================================
   7. SEARCH BOX
========================================== */

.search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;
    margin-top: 25px;
}

.search-box input {
    width: 100%;
    max-width: 400px;

    padding: 13px;

    border: 1px solid #e0b0c0;
    border-radius: 8px;

    font-size: 15px;
}


/* Search result count */

#home #search-result {
    color: #ad1457;
    font-size: 15px;
    font-weight: bold;
    margin-top: 20px;
}


/* Clear Search button */

#clear-search {
    background-color: white;
    color: #ad1457;
    border: 1px solid #ad1457;
}

#clear-search:hover {
    background-color: #fce4ec;
}


/* No products found message */

#no-products {
    background-color: white;
    color: #666666;

    padding: 25px;
    margin-top: 20px;

    border-radius: 10px;
    text-align: center;
}


/* ==========================================
   8. PRODUCT GRID
========================================== */

.product-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;
}


/* ==========================================
   9. PRODUCT CARDS
========================================== */

.product {
    display: flex;
    flex-direction: column;
    position: relative;

    background-color: white;

    border-radius: 15px;
    border: 1px solid #fce4ec;

    width: 100%;
    min-width: 0;

    padding: 20px;

    text-align: center;
    overflow: hidden;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08);

    transition: box-shadow 0.2s ease;
}


/* Product card hover effect */

.product:hover {
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.14);
}


/* ==========================================
   10. PRODUCT IMAGES
========================================== */

.product img {
    display: block;

    width: 100%;
    height: auto;

    aspect-ratio: 1 / 1;

    object-fit: contain;

    border-radius: 10px;
}


/* ==========================================
   11. PRODUCT NAME
========================================== */

.product h3 {
    color: #333333;

    font-size: 20px;

    margin: 15px 0 8px;

    overflow-wrap: anywhere;
}


/* ==========================================
   12. PRODUCT DESCRIPTION
========================================== */

.description {
    color: #666666;

    font-size: 14px;
    line-height: 1.6;

    margin: 5px 0 10px;

    overflow-wrap: anywhere;
}


/* ==========================================
   13. PRODUCT PRICES
========================================== */

.price {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 12px;

    margin: 15px 0;
}


/* Original price */

.product del {
    color: #777777;
    font-size: 15px;
}


/* Selling price */

.product strong {
    color: #ad1457;
    font-size: 24px;
}


/* ==========================================
   14. DISCOUNT BADGES
========================================== */

.discount {
    position: absolute;

    top: 12px;
    left: 12px;

    background-color: #ad1457;
    color: white;

    padding: 6px 10px;

    border-radius: 6px;

    font-size: 12px;
    font-weight: bold;
}


/* ==========================================
   15. GENERAL BUTTON DESIGN
========================================== */

button {
    background-color: #ad1457;
    color: white;

    border: none;
    border-radius: 8px;

    padding: 12px 20px;

    min-height: 44px;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;

    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #831843;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ==========================================
   16. ADD TO CART BUTTON
========================================== */

.product button {
    width: 100%;

    margin-top: auto;

    padding: 13px;
}


/* ==========================================
   17. SHOPPING CART SECTION
========================================== */

#cart {
    width: 100%;
    max-width: 650px;

    margin: 40px auto;
    padding: 25px;

    background-color: white;

    border-radius: 15px;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08);

    overflow-wrap: anywhere;
}


/* Shopping cart products container */

#cart-items {
    background-color: #fff0f5;

    padding: 15px;

    border-radius: 8px;
}


/* Total cart quantity */

#cart-count {
    color: #ad1457;
    font-weight: bold;
}


/* Cart total */

.cart-total {
    color: #ad1457;
    font-size: 22px;
    font-weight: bold;
}


/* ==========================================
   18. INDIVIDUAL CART PRODUCT
========================================== */

.cart-item {
    display: flex;
    align-items: center;

    gap: 15px;

    background-color: white;

    padding: 12px;
    margin-bottom: 12px;

    border: 1px solid #fce4ec;
    border-radius: 10px;
}

.cart-item:last-child {
    margin-bottom: 0;
}


/* Cart product photograph */

.cart-item img {
    width: 80px;
    height: 80px;

    object-fit: contain;

    border-radius: 8px;

    flex-shrink: 0;
}


/* Cart product information */

.cart-details {
    flex: 1;
    min-width: 0;
}


/* Cart product name */

.cart-details h3 {
    font-size: 16px;
    color: #333333;

    margin: 0 0 5px;

    overflow-wrap: anywhere;
}


/* Cart product price */

.cart-details p {
    font-size: 14px;
    color: #666666;

    margin: 0;
}


/* Individual product subtotal */

.cart-item-total {
    color: #ad1457;

    font-size: 18px;

    white-space: nowrap;
}


/* ==========================================
   19. CART QUANTITY CONTROLS
========================================== */

.quantity-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 12px;
}


/* Plus and minus buttons */

.quantity-controls button {
    min-width: 44px;
    min-height: 44px;

    padding: 8px;

    border-radius: 6px;

    background-color: #fce4ec;
    color: #ad1457;

    border: 1px solid #ad1457;

    font-size: 16px;
    font-weight: bold;
}

.quantity-controls button:hover {
    background-color: #ad1457;
    color: white;
}


/* Quantity number */

.quantity-number {
    min-width: 25px;

    text-align: center;

    font-size: 16px;
    font-weight: bold;
}


/* ==========================================
   20. REMOVE PRODUCT BUTTON
========================================== */

.quantity-controls .remove-button {
    background-color: white;
    color: #b91c1c;

    border: 1px solid #b91c1c;

    font-size: 12px;

    padding: 8px 12px;
}

.quantity-controls .remove-button:hover {
    background-color: #b91c1c;
    color: white;
}


/* ==========================================
   21. CLEAR CART BUTTON
========================================== */

#clear-cart {
    width: 100%;

    margin-bottom: 15px;

    background-color: white;
    color: #b91c1c;

    border: 1px solid #b91c1c;
}

#clear-cart:hover {
    background-color: #b91c1c;
    color: white;
}

#clear-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;

    background-color: white;
    color: #b91c1c;
}


/* ==========================================
   22. PRICE SUMMARY - DAY 11
========================================== */

.price-summary {
    background-color: #fff0f5;

    padding: 20px;
    margin: 20px 0;

    border: 1px solid #fce4ec;
    border-radius: 12px;
}


/* Price summary heading */

.price-summary h3 {
    color: #ad1457;

    font-size: 22px;

    margin-top: 0;
}


/* Individual price rows */

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    padding: 10px 0;

    font-size: 15px;
}

.summary-row > :last-child {
    text-align: right;
}


/* Customer savings */

.savings {
    color: #166534;
    font-weight: bold;
}


/* Final payable amount */

.final-total {
    font-size: 22px;

    color: #ad1457;

    font-weight: bold;
}


/* Price summary divider */

.price-summary hr {
    border: none;

    border-top: 1px solid #e0b0c0;

    margin: 10px 0;
}


/* ==========================================
   23. FREE DELIVERY PROGRESS BAR
========================================== */


/* Delivery message container */

.delivery-box {
    background-color: #fce4ec;

    padding: 15px;
    margin-bottom: 20px;

    border-radius: 10px;
}


/* Delivery message */

#delivery-message {
    color: #ad1457;

    font-size: 14px;
    font-weight: bold;

    text-align: center;

    margin-top: 0;
}


/* Progress bar background */

.progress-bar {
    width: 100%;
    height: 10px;

    background-color: white;

    border-radius: 20px;

    overflow: hidden;
}


/* Progress bar filling */

#delivery-progress {
    height: 100%;
    width: 0%;

    background-color: #ad1457;

    border-radius: 20px;

    transition: width 0.3s ease;
}


/* ==========================================
   24. PROCEED TO ORDER BUTTON
========================================== */

.checkout-button {
    display: block;

    background-color: #ad1457;
    color: white;

    min-height: 44px;

    padding: 13px 20px;

    border-radius: 8px;

    text-decoration: none;
    text-align: center;

    font-weight: bold;
}

.checkout-button:hover {
    background-color: #831843;
}


/* ==========================================
   25. CUSTOMER ORDER SECTION
========================================== */

#checkout {
    width: 100%;
    max-width: 650px;

    margin: 40px auto;
    padding: 25px;

    background-color: white;

    border-radius: 15px;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08);

    overflow-wrap: anywhere;
}


/* ==========================================
   26. CUSTOMER FORM LABELS
========================================== */

form label {
    display: block;

    font-size: 15px;
    font-weight: bold;

    margin-top: 15px;
    margin-bottom: 8px;
}


/* ==========================================
   27. CUSTOMER INPUT FIELDS
========================================== */

form input,
form textarea {
    width: 100%;

    padding: 12px;

    border: 1px solid #e0b0c0;
    border-radius: 8px;

    background-color: white;

    font: inherit;
}


/* Input and keyboard focus effect */

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: 2px solid #ad1457;
    outline-offset: 2px;
}

header a:focus-visible,
footer a:focus-visible {
    outline-color: white;
}


/* ==========================================
   28. DELIVERY ADDRESS
========================================== */

textarea {
    min-height: 100px;
    resize: vertical;
}


/* ==========================================
   29. PLACE ORDER BUTTON
========================================== */

.order-button {
    width: 100%;

    margin-top: 25px;

    padding: 15px;

    font-size: 16px;
}


/* ==========================================
   30. WEBSITE FOOTER
========================================== */

footer {
    background-color: #ad1457;
    color: white;

    text-align: center;

    padding: 35px 20px;
}

footer h2 {
    font-family: Georgia, serif;

    font-size: 28px;

    margin-top: 0;
}

footer h3 {
    margin-top: 25px;
}

footer p {
    font-size: 14px;
}

footer a {
    color: white;
    text-decoration: underline;
}


/* ==========================================
   31. RESPONSIVE LAPTOP SCREENS
========================================== */

@media (max-width: 1199px) {

    .product-grid {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

    }

}


/* ==========================================
   32. RESPONSIVE TABLET SCREENS
========================================== */

@media (max-width: 900px) {

    .product-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;

    }

    main {
        padding: 18px;
    }

    nav {
        gap: 10px;
    }

    .product {
        padding: 15px;
    }

}


/* ==========================================
   33. RESPONSIVE MOBILE SCREENS
========================================== */

@media (max-width: 600px) {


    /* Website body */

    body {
        font-size: 14px;
    }


    /* Website header */

    header {
        padding: 20px 12px;
    }

    header p {
        font-size: 14px;
    }


    /* Navigation menu */

    nav {
        gap: 4px;
        padding: 10px;
    }

    nav a {
        font-size: 13px;
        padding: 10px 8px;
    }


    /* Main content */

    main {
        padding: 12px;
    }

    section {
        margin-bottom: 25px;
    }

    section h2 {
        font-size: 22px;
        margin-bottom: 18px;
    }


    /* Welcome section */

    #home {
        padding: 25px 15px;
    }

    #home p {
        font-size: 14px;
    }


    /* Mobile search box */

    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    .search-box input {
        width: 100%;
        max-width: none;

        font-size: 16px;
    }

    .search-box button {
        width: 100%;
    }

    #home #search-result {
        font-size: 14px;
    }


    /* Two product columns */

    .product-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;

    }


    /* Mobile product cards */

    .product {
        padding: 10px;
        border-radius: 12px;
    }

    .product h3 {
        font-size: 15px;
        margin: 10px 0 5px;
    }

    .description {
        font-size: 12px;
        line-height: 1.5;
    }


    /* Mobile product prices */

    .price {
        gap: 6px;
        margin: 10px 0;
    }

    .product strong {
        font-size: 20px;
    }

    .product del {
        font-size: 12px;
    }


    /* Discount badge */

    .discount {
        top: 6px;
        left: 6px;

        padding: 4px 6px;

        font-size: 10px;
    }


    /* Add to Cart button */

    .product button {
        font-size: 13px;
        padding: 10px 6px;
    }


    /* Shopping cart and checkout */

    #cart,
    #checkout {
        width: 100%;

        padding: 15px;

        margin: 25px auto;
    }

    #cart-items {
        padding: 10px;
    }

    .cart-total {
        font-size: 20px;
    }


    /* Mobile cart products */

    .cart-item {
        flex-wrap: wrap;

        gap: 10px;

        padding: 10px;
    }

    .cart-item img {
        width: 50px;
        height: 50px;
    }

    .cart-details {
        flex: 1;
        min-width: 120px;
    }

    .cart-details h3 {
        font-size: 13px;
    }

    .cart-details p {
        font-size: 12px;
    }

    .cart-item-total {
        width: 100%;

        font-size: 15px;

        text-align: right;
    }


    /* Mobile quantity controls */

    .quantity-controls {
        gap: 6px;
    }

    .quantity-controls .remove-button {
        font-size: 11px;
    }


    /* Mobile price summary */

    .price-summary {
        padding: 15px;
    }

    .summary-row {
        font-size: 14px;
        gap: 10px;
    }

    .final-total {
        font-size: 19px;
    }


    /* Mobile delivery message */

    #delivery-message {
        font-size: 13px;
    }


    /* Mobile customer form */

    form input,
    form textarea {
        font-size: 16px;
    }

    form label {
        font-size: 14px;
    }

    .order-button {
        width: 100%;
    }


    /* Mobile footer */

    footer {
        padding: 25px 15px;
    }

    footer h2 {
        font-size: 24px;
    }

}


/* ==========================================
   34. VERY SMALL MOBILE SCREENS
========================================== */

@media (max-width: 360px) {

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product {
        padding: 15px;
    }

    .product h3 {
        font-size: 17px;
    }

    .cart-details {
        min-width: 100px;
    }

}


/* ==========================================
   35. REDUCED MOTION ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }

}


/* ==========================================
   END OF CSS
   DAY 1 TO DAY 11 COMPLETED
========================================== */


/* ==========================================
   DAY 13 - CUSTOMER FORM VALIDATION
========================================== */


/* Checkout description */

.checkout-description {
    text-align: center;
    color: #666666;
    font-size: 15px;
}


/* Individual error messages */

.error-message {
    display: block;
    color: #b91c1c;
    font-size: 13px;
    margin-top: 5px;
}

.error-message:empty {
    display: none;
}


/* Invalid input fields */

form input.input-error,
form textarea.input-error {
    border: 2px solid #b91c1c;
    background-color: #fff5f5;
}

form .input-error:focus {
    outline-color: #b91c1c;
}


/* Checkout total container */

.order-summary-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;

    background-color: #fff0f5;
    color: #ad1457;

    padding: 18px;
    margin-top: 25px;

    border: 1px solid #fce4ec;
    border-radius: 10px;

    font-size: 20px;
}


/* Order status message */

#order-message {
    padding: 15px;
    margin-top: 20px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: bold;
}


/* Error status */

#order-message.order-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}


/* Success status */

#order-message.order-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}


/* Mobile checkout design */

@media (max-width: 600px) {

    .checkout-description {
        font-size: 14px;
    }

    .error-message {
        font-size: 12px;
    }

    .order-summary-box {
        padding: 15px;
        font-size: 18px;
    }

    #order-message {
        font-size: 13px;
    }

}


/* ==========================================
   DAY 14 - WHATSAPP ORDER DESIGN
========================================== */

.whatsapp-button {
    width: 100%;

    background-color: #128c7e;
    color: white;

    padding: 16px;
    margin-top: 15px;

    border: none;
    border-radius: 10px;

    font-size: 17px;
    font-weight: bold;

    cursor: pointer;
}


/* WhatsApp button hover */

.whatsapp-button:hover {
    background-color: #075e54;
}


/* Order information */

.order-note {
    background-color: #f0fdf4;
    color: #166534;

    padding: 15px;
    margin-top: 20px;

    border: 1px solid #bbf7d0;
    border-radius: 8px;

    font-size: 14px;
    text-align: center;
}


/* Mobile design */

@media (max-width: 600px) {

    .whatsapp-button {
        font-size: 15px;
        padding: 14px;
    }

    .order-note {
        font-size: 12px;
    }

}


/* ==========================================
   DAY 15 - BUSINESS POLICIES
========================================== */

#policies {
    max-width: 900px;
    margin: 40px auto;
}

.policy-card {
    background-color: white;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #fce4ec;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.policy-card h3 {
    color: #ad1457;
    font-size: 20px;
    margin-top: 0;
}

.policy-card p {
    color: #555555;
    font-size: 15px;
    line-height: 1.7;
}

@media (max-width: 600px) {

    .policy-card {
        padding: 15px;
    }

    .policy-card h3 {
        font-size: 18px;
    }

    .policy-card p {
        font-size: 14px;
    }

}
