From 37ebfda18db7556dcbf65c13005924ca92ed8206 Mon Sep 17 00:00:00 2001 From: Miguel Almanza Date: Thu, 25 Jun 2026 18:23:49 -0600 Subject: [PATCH 1/2] feat: catalog landing page with HTML, SCSS and BEM methodology --- .github/workflows/test.yml-template | 29 ++ package-lock.json | 170 +----------- package.json | 2 +- src/index.html | 395 +++++++++++++++++++++++++++- src/styles/_base.scss | 5 + src/styles/_button.scss | 29 ++ src/styles/_card.scss | 82 ++++++ src/styles/_catalog.scss | 31 +++ src/styles/_header.scss | 62 +++++ src/styles/_price.scss | 23 ++ src/styles/_reviews.scss | 14 + src/styles/_stars.scss | 36 +++ src/styles/_variables.scss | 7 + src/styles/index.scss | 14 +- 14 files changed, 729 insertions(+), 170 deletions(-) create mode 100644 .github/workflows/test.yml-template create mode 100644 src/styles/_base.scss create mode 100644 src/styles/_button.scss create mode 100644 src/styles/_card.scss create mode 100644 src/styles/_catalog.scss create mode 100644 src/styles/_header.scss create mode 100644 src/styles/_price.scss create mode 100644 src/styles/_reviews.scss create mode 100644 src/styles/_stars.scss create mode 100644 src/styles/_variables.scss diff --git a/.github/workflows/test.yml-template b/.github/workflows/test.yml-template new file mode 100644 index 0000000000..8b5743ecb4 --- /dev/null +++ b/.github/workflows/test.yml-template @@ -0,0 +1,29 @@ +name: Test + +on: + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test + - name: Upload HTML report(backstop data) + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: report + path: backstop_data diff --git a/package-lock.json b/package-lock.json index 6dd164c6e0..a1c3f92dc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@mate-academy/backstop-config": "latest", "@mate-academy/bemlint": "latest", "@mate-academy/linthtml-config": "latest", - "@mate-academy/scripts": "^1.8.6", + "@mate-academy/scripts": "^2.1.3", "@mate-academy/stylelint-config": "latest", "@parcel/transformer-sass": "^2.12.0", "backstopjs": "6.3.23", @@ -1212,10 +1212,11 @@ "dev": true }, "node_modules/@mate-academy/scripts": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@mate-academy/scripts/-/scripts-1.8.6.tgz", - "integrity": "sha512-b4om/whj4G9emyi84ORE3FRZzCRwRIesr8tJHXa8EvJdOaAPDpzcJ8A0sFfMsWH9NUOVmOwkBtOXDu5eZZ00Ig==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@mate-academy/scripts/-/scripts-2.1.3.tgz", + "integrity": "sha512-a07wHTj/1QUK2Aac5zHad+sGw4rIvcNl5lJmJpAD7OxeSbnCdyI6RXUHwXhjF5MaVo9YHrJ0xVahyERS2IIyBQ==", "dev": true, + "license": "MIT", "dependencies": { "@octokit/rest": "^17.11.2", "@types/get-port": "^4.2.0", @@ -5471,87 +5472,6 @@ "node": ">=12 || >=16" } }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-select/node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/css-select/node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/css-select/node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/css-select/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/css-tree": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", @@ -5589,45 +5509,6 @@ "node": ">=4" } }, - "node_modules/csso": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", - "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "css-tree": "~2.2.0" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/csso/node_modules/css-tree": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", - "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "mdn-data": "2.0.28", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/csso/node_modules/mdn-data": { - "version": "2.0.28", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", - "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/data-uri-to-buffer": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", @@ -10757,20 +10638,6 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "node_modules/srcset": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/srcset/-/srcset-5.0.1.tgz", - "integrity": "sha512-/P1UYbGfJVlxZag7aABNRrulEXAwCSDo7fklafOQrantuPTDmYgijJMks2zusPCVzgW9+4P69mq7w6pYuZpgxw==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/stable": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", @@ -11176,33 +11043,6 @@ "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", "dev": true }, - "node_modules/svgo": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.3.2.tgz", - "integrity": "sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@trysound/sax": "0.2.0", - "commander": "^7.2.0", - "css-select": "^5.1.0", - "css-tree": "^2.3.1", - "css-what": "^6.1.0", - "csso": "^5.0.5", - "picocolors": "^1.0.0" - }, - "bin": { - "svgo": "bin/svgo" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/svgo" - } - }, "node_modules/table": { "version": "6.8.2", "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", diff --git a/package.json b/package.json index 34398805fa..f538e623d5 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@mate-academy/backstop-config": "latest", "@mate-academy/bemlint": "latest", "@mate-academy/linthtml-config": "latest", - "@mate-academy/scripts": "^1.8.6", + "@mate-academy/scripts": "^2.1.3", "@mate-academy/stylelint-config": "latest", "@parcel/transformer-sass": "^2.12.0", "backstopjs": "6.3.23", diff --git a/src/index.html b/src/index.html index 9cff78eeb7..785da6d412 100644 --- a/src/index.html +++ b/src/index.html @@ -22,6 +22,399 @@ -

Catalog

+
+
+ + + + + +
+
+ +
+ +
+ +
+ Product image +
+ + +
+ + +
+

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

+ Product code: 195434 +
+ + +
+
+ + + + + +
+ Reviews: 5 +
+ + +
+ Price: + $2,199 +
+ + + + +
+
+ + +
+ +
+ Product image +
+ + +
+ + +
+

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

+ Product code: 195434 +
+ + +
+
+ + + + + +
+ Reviews: 5 +
+ + +
+ Price: + $2,199 +
+ + + + +
+
+ + +
+ +
+ Product image +
+ + +
+ + +
+

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

+ Product code: 195434 +
+ + +
+
+ + + + + +
+ Reviews: 5 +
+ + +
+ Price: + $2,199 +
+ + + + +
+
+ + +
+ +
+ Product image +
+ + +
+ + +
+

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

+ Product code: 195434 +
+ + +
+
+ + + + + +
+ Reviews: 5 +
+ + +
+ Price: + $2,199 +
+ + + + +
+
+ + +
+ +
+ Product image +
+ + +
+ + +
+

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

+ Product code: 195434 +
+ + +
+
+ + + + + +
+ Reviews: 5 +
+ + +
+ Price: + $2,199 +
+ + + + +
+
+ + +
+ +
+ Product image +
+ + +
+ + +
+

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

+ Product code: 195434 +
+ + +
+
+ + + + + +
+ Reviews: 5 +
+ + +
+ Price: + $2,199 +
+ + + + +
+
+ + +
+ +
+ Product image +
+ + +
+ + +
+

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

+ Product code: 195434 +
+ + +
+
+ + + + + +
+ Reviews: 5 +
+ + +
+ Price: + $2,199 +
+ + + + +
+
+ + +
+ +
+ Product image +
+ + +
+ + +
+

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

+ Product code: 195434 +
+ + +
+
+ + + + + +
+ Reviews: 5 +
+ + +
+ Price: + $2,199 +
+ + + + +
+
+ +
+ + + + diff --git a/src/styles/_base.scss b/src/styles/_base.scss new file mode 100644 index 0000000000..389e6ea70d --- /dev/null +++ b/src/styles/_base.scss @@ -0,0 +1,5 @@ +body { + margin: 0; + font-family: Roboto, sans-serif; + font-weight: 500; + } \ No newline at end of file diff --git a/src/styles/_button.scss b/src/styles/_button.scss new file mode 100644 index 0000000000..34fc254185 --- /dev/null +++ b/src/styles/_button.scss @@ -0,0 +1,29 @@ +.button { + // 1. Dimensiones de Figma + width: 100%; // O usa 166px si quieres que sea fijo, pero 100% es mejor para cards + height: 40px; // Podemos definir height directamente... + display: flex; // ...y usar flex para centrar el texto perfectamente + justify-content: center; + align-items: center; + + // 2. Estética + background-color: $color-primary; + color: #fff; + border: 1px solid transparent; + border-radius: 5px; // El valor exacto de tu captura + cursor: pointer; + transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease; + + font-family: $font-main; + font-size: 14px; + font-weight: 700; + line-height: 1.14; + text-transform: uppercase; + + &:hover { + background-color: #fff; // El #ffff que viste en Figma + color: $color-primary; // Texto ahora es color primario + border: 1px solid $color-primary; // Borde color primario + text-decoration: none; + } +} diff --git a/src/styles/_card.scss b/src/styles/_card.scss new file mode 100644 index 0000000000..15ae3babf1 --- /dev/null +++ b/src/styles/_card.scss @@ -0,0 +1,82 @@ +.card { + width: $card-width; + border: 1px solid $color-border; + border-radius: 16px; + padding: 16px 8px; + font-family: $font-main; + color: $color-text; + box-sizing: border-box; + background-color: #fff; + overflow: hidden; + + /* NUEVO: Preparamos la tarjeta para que se anime suavemente */ + transition: transform 300ms ease; + + &__image { + display: flex; + justify-content: center; + margin-top: 17px; + margin-bottom: 40px; + + img { + width: 160px; + height: 134px; + object-fit: contain; + } + } + + &__content { + display: flex; + flex-direction: column; + margin: 0 8px; + } + + &__header { + display: flex; + flex-direction: column; + gap: 4px; + margin-bottom: 16px; + } + + &__title { + margin: 0; + font-family: $font-main; + font-size: 12px; + font-weight: 500; + line-height: 1.5; + color: $color-text; + letter-spacing: 0; + + /* NUEVO: Transición suave también para el color del texto */ + transition: color 300ms ease; + } + + &__sku { + margin: 0; + font-family: $font-main; + font-size: 10px; + line-height: 1.4; + font-weight: 400; + color: $color-text-secondary; + letter-spacing: 0; + } + + &__reviews { + margin-bottom: 24px; + } + + &__price { + margin-bottom: 16px; + } + + /* Preguntar porque movimos hasta abajo este estado de hover */ + &:hover { + transform: scale(1.2); /* Crece un 20% */ + + /* Al hacer hover en la card, cambiamos el color del título interno */ + .card__title { + color: #34568b; + } + } + +} \ No newline at end of file diff --git a/src/styles/_catalog.scss b/src/styles/_catalog.scss new file mode 100644 index 0000000000..4dd8549158 --- /dev/null +++ b/src/styles/_catalog.scss @@ -0,0 +1,31 @@ +.catalog { + /* Paddings fijos requeridos: 50px vertical, 40px horizontal */ + padding: 50px 40px; + + /* Activamos CSS Grid */ + display: grid; + + /* Por defecto (pantallas pequeñas): 1 columna del ancho de la card (200px) */ + grid-template-columns: 200px; + + /* Gaps requeridos: 48px horizontal y 46px vertical */ + gap: 46px 48px; + + /* Centramos el grid en la pantalla para que se vea bien */ + justify-content: center; + + /* 2 columnas a partir de 488px */ + @media (min-width: 488px) { + grid-template-columns: repeat(2, 200px); + } + + /* 3 columnas a partir de 768px */ + @media (min-width: 768px) { + grid-template-columns: repeat(3, 200px); + } + + /* 4 columnas a partir de 1024px */ + @media (min-width: 1024px) { + grid-template-columns: repeat(4, 200px); + } + } \ No newline at end of file diff --git a/src/styles/_header.scss b/src/styles/_header.scss new file mode 100644 index 0000000000..0c7b2cae8a --- /dev/null +++ b/src/styles/_header.scss @@ -0,0 +1,62 @@ +.header { + width: 100%; + background-color: #fff; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + + &__container { + max-width: 1200px; + margin: 0 auto; + padding: 0 16px; + display: flex; + justify-content: space-between; + align-items: center; + } + } + + .nav { + text-transform: uppercase; + + &__list { + display: flex; + align-items: center; + list-style: none; + margin: 0; + padding: 0; + } + + &__item { + margin-left: 24px; + + &:first-child { + margin-left: 0; + } + } + + &__link { + text-decoration: none; + color: $color-text; + transition: color $transition-time ease; + height: 80px; + display: flex; + align-items: center; + + &:hover { + color: $color-primary; + } + + &.is-active { + position: relative; + color: $color-primary; + + &::after { + content: ""; + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 4px; + background-color: $color-primary; + } + } + } + } \ No newline at end of file diff --git a/src/styles/_price.scss b/src/styles/_price.scss new file mode 100644 index 0000000000..e9a9d63edc --- /dev/null +++ b/src/styles/_price.scss @@ -0,0 +1,23 @@ +@import "./variables"; + +.price { + display: flex; + align-items: baseline; // Alinea los textos por su base para que se vean nivelados + justify-content: space-between; + + &__label { // O &__label + font-family: $font-main; + font-weight: 400; + font-size: 12px; + line-height: 1.5; + color: $color-text-secondary; // Ese #707070 que suele ser el gris de la guía + } + + &__value { // O &__value + font-family: $font-main; + font-size: 18px; + font-weight: 700; + color: $color-text; + line-height: 1; + } +} diff --git a/src/styles/_reviews.scss b/src/styles/_reviews.scss new file mode 100644 index 0000000000..8d417b99c5 --- /dev/null +++ b/src/styles/_reviews.scss @@ -0,0 +1,14 @@ +@import "./variables"; + +.reviews { + display: flex; // Convertimos el contenedor en flexbox + align-items: center; // Centramos verticalmente estrellas y texto + justify-content: space-between; // Aquí va el gap exacto de Figma + + &__count { + font-size: 10px; + line-height: 1.4; + color: $color-text-secondary; + font-family: $font-main; + } +} diff --git a/src/styles/_stars.scss b/src/styles/_stars.scss new file mode 100644 index 0000000000..09f23e74b0 --- /dev/null +++ b/src/styles/_stars.scss @@ -0,0 +1,36 @@ +@import "./variables"; + +.stars { + display: flex; + gap: 4px; + + &__item { + display: inline-block; + width: 12px; + height: 12px; + background-image: url('../images/star.svg'); // Ruta relativa corregida + background-repeat: no-repeat; + background-size: contain; + } + + // Agregamos TODOS los modificadores requeridos + &--1 { + .stars__item:nth-child(-n+1) { background-image: url('../images/star-active.svg'); } + } + + &--2 { + .stars__item:nth-child(-n+2) { background-image: url('../images/star-active.svg'); } + } + + &--3 { + .stars__item:nth-child(-n+3) { background-image: url('../images/star-active.svg'); } + } + + &--4 { + .stars__item:nth-child(-n+4) { background-image: url('../images/star-active.svg'); } + } + + &--5 { + .stars__item:nth-child(-n+5) { background-image: url('../images/star-active.svg'); } + } +} \ No newline at end of file diff --git a/src/styles/_variables.scss b/src/styles/_variables.scss new file mode 100644 index 0000000000..4c160ff433 --- /dev/null +++ b/src/styles/_variables.scss @@ -0,0 +1,7 @@ +$font-main: 'Roboto', sans-serif; +$color-primary: #00ACDC; +$color-text: #060B35; +$color-text-secondary: #616070; +$card-width: 200px; +$color-border: #F3F3F3; +$transition-time: 300ms; diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f13..d9061c8bc1 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,11 @@ -body { - margin: 0; -} +@import 'variables'; +@import 'base'; +@import 'header'; + +/* Componentes de la Card */ +@import 'button'; +@import 'card'; +@import 'price'; +@import 'reviews'; +@import 'stars'; +@import 'catalog'; \ No newline at end of file From 0996d60c1c5ca32214b0e9e5371566c25b2a8959 Mon Sep 17 00:00:00 2001 From: Miguel Almanza Date: Tue, 7 Jul 2026 10:40:16 -0600 Subject: [PATCH 2/2] refactor: clean scss partials, remove imports and fix style guide issues --- src/index.html | 57 -------------------------------------- src/styles/_base.scss | 2 +- src/styles/_button.scss | 18 ++++++------ src/styles/_card.scss | 15 ++++------ src/styles/_catalog.scss | 18 ++++-------- src/styles/_header.scss | 2 +- src/styles/_price.scss | 10 +++---- src/styles/_reviews.scss | 8 ++---- src/styles/_stars.scss | 6 ++-- src/styles/_variables.scss | 1 + src/styles/index.scss | 2 -- 11 files changed, 30 insertions(+), 109 deletions(-) diff --git a/src/index.html b/src/index.html index 785da6d412..8333585dfa 100644 --- a/src/index.html +++ b/src/index.html @@ -70,25 +70,19 @@ -
-
-
Product image
-
-

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Product code: 195434
-
@@ -100,13 +94,11 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Reviews: 5
-
Price: $2,199
-
-
-
Product image
-
-

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Product code: 195434
-
@@ -145,13 +132,11 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Reviews: 5
-
Price: $2,199
- @@ -159,23 +144,18 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

-
-
Product image
-
-

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Product code: 195434
-
@@ -187,13 +167,11 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Reviews: 5
-
Price: $2,199
- @@ -201,23 +179,18 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

-
-
Product image
-
-

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Product code: 195434
-
@@ -229,13 +202,11 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Reviews: 5
-
Price: $2,199
- @@ -243,23 +214,18 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

-
-
Product image
-
-

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Product code: 195434
-
@@ -271,13 +237,11 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Reviews: 5
-
Price: $2,199
- @@ -285,23 +249,18 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

-
-
Product image
-
-

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Product code: 195434
-
@@ -313,13 +272,11 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Reviews: 5
-
Price: $2,199
- @@ -327,23 +284,18 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

-
-
Product image
-
-

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Product code: 195434
-
@@ -355,13 +307,11 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Reviews: 5
-
Price: $2,199
- @@ -369,23 +319,18 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

-
-
Product image
-
-

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Product code: 195434
-
@@ -397,13 +342,11 @@

APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)

Reviews: 5
-
Price: $2,199
- diff --git a/src/styles/_base.scss b/src/styles/_base.scss index 389e6ea70d..d5204fb98d 100644 --- a/src/styles/_base.scss +++ b/src/styles/_base.scss @@ -1,5 +1,5 @@ body { margin: 0; - font-family: Roboto, sans-serif; + font-family: $font-main; font-weight: 500; } \ No newline at end of file diff --git a/src/styles/_button.scss b/src/styles/_button.scss index 34fc254185..66bfc7e496 100644 --- a/src/styles/_button.scss +++ b/src/styles/_button.scss @@ -1,16 +1,14 @@ .button { - // 1. Dimensiones de Figma - width: 100%; // O usa 166px si quieres que sea fijo, pero 100% es mejor para cards - height: 40px; // Podemos definir height directamente... - display: flex; // ...y usar flex para centrar el texto perfectamente + width: 100%; + height: 40px; + display: flex; justify-content: center; align-items: center; - // 2. Estética background-color: $color-primary; - color: #fff; + color: $color-white; border: 1px solid transparent; - border-radius: 5px; // El valor exacto de tu captura + border-radius: 5px; cursor: pointer; transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease; @@ -21,9 +19,9 @@ text-transform: uppercase; &:hover { - background-color: #fff; // El #ffff que viste en Figma - color: $color-primary; // Texto ahora es color primario - border: 1px solid $color-primary; // Borde color primario + background-color: $color-white; + color: $color-primary; + border: 1px solid $color-primary; text-decoration: none; } } diff --git a/src/styles/_card.scss b/src/styles/_card.scss index 15ae3babf1..c5c05266fe 100644 --- a/src/styles/_card.scss +++ b/src/styles/_card.scss @@ -6,10 +6,9 @@ font-family: $font-main; color: $color-text; box-sizing: border-box; - background-color: #fff; + background-color: $color-white; overflow: hidden; - /* NUEVO: Preparamos la tarjeta para que se anime suavemente */ transition: transform 300ms ease; &__image { @@ -47,7 +46,6 @@ color: $color-text; letter-spacing: 0; - /* NUEVO: Transición suave también para el color del texto */ transition: color 300ms ease; } @@ -69,14 +67,11 @@ margin-bottom: 16px; } - /* Preguntar porque movimos hasta abajo este estado de hover */ &:hover { - transform: scale(1.2); /* Crece un 20% */ + transform: scale(1.2); - /* Al hacer hover en la card, cambiamos el color del título interno */ - .card__title { - color: #34568b; - } + .card__title { + color: #34568b; } - + } } \ No newline at end of file diff --git a/src/styles/_catalog.scss b/src/styles/_catalog.scss index 4dd8549158..e727bf5b12 100644 --- a/src/styles/_catalog.scss +++ b/src/styles/_catalog.scss @@ -1,31 +1,23 @@ .catalog { - /* Paddings fijos requeridos: 50px vertical, 40px horizontal */ padding: 50px 40px; - /* Activamos CSS Grid */ display: grid; - /* Por defecto (pantallas pequeñas): 1 columna del ancho de la card (200px) */ - grid-template-columns: 200px; - - /* Gaps requeridos: 48px horizontal y 46px vertical */ + grid-template-columns: $card-width; + gap: 46px 48px; - /* Centramos el grid en la pantalla para que se vea bien */ justify-content: center; - /* 2 columnas a partir de 488px */ @media (min-width: 488px) { - grid-template-columns: repeat(2, 200px); + grid-template-columns: repeat(2, $card-width); } - /* 3 columnas a partir de 768px */ @media (min-width: 768px) { - grid-template-columns: repeat(3, 200px); + grid-template-columns: repeat(3, $card-width); } - /* 4 columnas a partir de 1024px */ @media (min-width: 1024px) { - grid-template-columns: repeat(4, 200px); + grid-template-columns: repeat(4, $card-width); } } \ No newline at end of file diff --git a/src/styles/_header.scss b/src/styles/_header.scss index 0c7b2cae8a..4a7be4e789 100644 --- a/src/styles/_header.scss +++ b/src/styles/_header.scss @@ -1,6 +1,6 @@ .header { width: 100%; - background-color: #fff; + background-color: $color-white; border-bottom: 1px solid rgba(0, 0, 0, 0.1); &__container { diff --git a/src/styles/_price.scss b/src/styles/_price.scss index e9a9d63edc..1093affbcf 100644 --- a/src/styles/_price.scss +++ b/src/styles/_price.scss @@ -1,19 +1,17 @@ -@import "./variables"; - .price { display: flex; - align-items: baseline; // Alinea los textos por su base para que se vean nivelados + align-items: baseline; justify-content: space-between; - &__label { // O &__label + &__label { font-family: $font-main; font-weight: 400; font-size: 12px; line-height: 1.5; - color: $color-text-secondary; // Ese #707070 que suele ser el gris de la guía + color: $color-text-secondary; } - &__value { // O &__value + &__value { font-family: $font-main; font-size: 18px; font-weight: 700; diff --git a/src/styles/_reviews.scss b/src/styles/_reviews.scss index 8d417b99c5..033d2342f5 100644 --- a/src/styles/_reviews.scss +++ b/src/styles/_reviews.scss @@ -1,9 +1,7 @@ -@import "./variables"; - .reviews { - display: flex; // Convertimos el contenedor en flexbox - align-items: center; // Centramos verticalmente estrellas y texto - justify-content: space-between; // Aquí va el gap exacto de Figma + display: flex; + align-items: center; + justify-content: space-between; &__count { font-size: 10px; diff --git a/src/styles/_stars.scss b/src/styles/_stars.scss index 09f23e74b0..35f11bb9e0 100644 --- a/src/styles/_stars.scss +++ b/src/styles/_stars.scss @@ -1,5 +1,3 @@ -@import "./variables"; - .stars { display: flex; gap: 4px; @@ -8,12 +6,12 @@ display: inline-block; width: 12px; height: 12px; - background-image: url('../images/star.svg'); // Ruta relativa corregida + background-image: url('../images/star.svg'); background-repeat: no-repeat; background-size: contain; } - // Agregamos TODOS los modificadores requeridos + &--1 { .stars__item:nth-child(-n+1) { background-image: url('../images/star-active.svg'); } } diff --git a/src/styles/_variables.scss b/src/styles/_variables.scss index 4c160ff433..1ddf36dac0 100644 --- a/src/styles/_variables.scss +++ b/src/styles/_variables.scss @@ -1,6 +1,7 @@ $font-main: 'Roboto', sans-serif; $color-primary: #00ACDC; $color-text: #060B35; +$color-white: #fff; $color-text-secondary: #616070; $card-width: 200px; $color-border: #F3F3F3; diff --git a/src/styles/index.scss b/src/styles/index.scss index d9061c8bc1..88798fc337 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,8 +1,6 @@ @import 'variables'; @import 'base'; @import 'header'; - -/* Componentes de la Card */ @import 'button'; @import 'card'; @import 'price';