Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Product Preview Card</title> | |
| <link href="https://fonts.googleapis.com/css2?family=Fraunces:wght@700&family=Montserrat:wght@500;700&display=swap" rel="stylesheet" /> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| :root { | |
| --green-500: hsl(158, 36%, 37%); | |
| --green-700: hsl(158, 42%, 18%); | |
| --black: hsl(212, 21%, 14%); | |
| --grey: hsl(228, 12%, 48%); | |
| --cream: hsl(30, 38%, 92%); | |
| --white: hsl(0, 0%, 100%); | |
| } | |
| body { | |
| background: var(--cream); | |
| font-family: 'Montserrat', sans-serif; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| min-height: 100vh; | |
| padding: 20px; | |
| } | |
| .container { | |
| display: flex; | |
| flex-direction: column; | |
| background-color: var(--white); | |
| border-radius: 20px; | |
| overflow: hidden; | |
| max-width: 700px; | |
| width: 100%; | |
| } | |
| .image picture, | |
| .image img { | |
| display: block; | |
| width: 100%; | |
| height: 100%; | |
| object-fit: cover; | |
| } | |
| .image img { | |
| border-radius: 20px 20px 0 0; | |
| } | |
| .product-info { | |
| padding: 30px; | |
| } | |
| .brand { | |
| font-size: 14px; | |
| color: var(--grey); | |
| letter-spacing: 2px; | |
| } | |
| h1 { | |
| font-family: 'Fraunces', serif; | |
| font-size: 24px; | |
| margin: 10px 0; | |
| } | |
| .description { | |
| font-size: 16px; | |
| margin-bottom: 20px; | |
| color: var(--grey); | |
| } | |
| .price { | |
| font-size: 24px; | |
| color: var(--green-500); | |
| font-weight: bold; | |
| margin-bottom: 10px; | |
| } | |
| .old-price { | |
| text-decoration: line-through; | |
| color: var(--grey); | |
| margin-bottom: 20px; | |
| } | |
| .add-to-cart { | |
| width: 100%; | |
| padding: 15px; | |
| background-color: var(--green-500); | |
| color: var(--white); | |
| border: none; | |
| border-radius: 10px; | |
| font-weight: bold; | |
| cursor: pointer; | |
| } | |
| .add-to-cart:hover { | |
| background-color: var(--green-700); | |
| } | |
| @media (min-width: 768px) { | |
| .container { | |
| flex-direction: row; | |
| align-items: stretch; | |
| } | |
| .image, .product-info { | |
| width: 50%; | |
| } | |
| .image img { | |
| height: 100%; | |
| border-radius: 20px 0 0 20px; | |
| } | |
| .product-info { | |
| border-radius: 0 20px 20px 0; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="image"> | |
| <picture> | |
| <source media="(max-width: 767px)" srcset="https://i.imgur.com/6Iej2c3.jpg" /> | |
| <img src="https://i.imgur.com/6Iej2c3.jpg" alt="Product Image" /> | |
| </picture> | |
| </div> | |
| <div class="product-info"> | |
| <p class="brand">PERFUME</p> | |
| <h1>Gabrielle Essence Eau De Parfum</h1> | |
| <p class="description">A floral, solar and voluptuous interpretation composed by Olivier Polge, Perfumer-Creator for the House of CHANEL.</p> | |
| <p class="price">$149.99</p> | |
| <p class="old-price">$169.99</p> | |
| <button class="add-to-cart">Add to Cart</button> | |
| </div> | |
| </div> | |
| </body> | |
| </html> | |